Code Monkey home page Code Monkey logo

cyberlympha-test-task's Introduction

News Service Application

This is a simple RESTful API application built with FastAPI for managing news articles and their comments.

Clean Architecture

This application follows the principles of clean architecture, which emphasizes separation of concerns and independence of frameworks. The codebase is organized into distinct layers - repository, service, and router - each responsible for specific functionalities. This separation allows for better maintainability, testability, and scalability of the application. Additionally, the use of dependency injection ensures loose coupling between components, making it easier to replace or modify individual parts of the system without affecting the overall functionality. Overall, clean architecture promotes a clear and modular design, facilitating easier understanding and development of complex software systems.

Technology Stack

  • Python 3.12.2: Programming language used for development.
  • FastAPI: Web framework used to build the RESTful API.
  • Pydantic: Data validation and parsing library used for defining schemas and parsing data.
  • Docker Compose: Tool used for defining and running multi-container Docker applications.
  • Ruff: Code formatting and linting tool for Python.

Running the Application

Prerequisites

Make sure you have Docker and Docker Compose installed on your machine.

Docker Compose

To run the application using Docker Compose, follow these steps:

  1. Clone this repository to your local machine:
git clone https://github.com/stirk1337/cyberlympha-test-task
  1. Navigate to the root directory of the project:
cd cyberlympha-test-task
  1. Start the application using Docker Compose and Makefile:
make dev
  1. Once the containers are up and running, you can access the API at http://localhost:8000. Additionally, you can explore the interactive documentation provided by Swagger UI by navigating to http://localhost:8000/docs

Makefile for Development

A Makefile is provided with useful commands for development tasks:

  • dev: Start the application using Docker Compose.
  • lint: Run code formatting and linting checks using Ruff.

To run these commands, simply execute make <command> in your terminal.

cyberlympha-test-task's People

Contributors

stirk1337 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.