|  | 
| 1 |  | -# fastapi-template | 
| 2 |  | -This is the template for fastapi service development | 
|  | 1 | +# FastAPI Template API | 
|  | 2 | + | 
|  | 3 | +API for FastAPI Template - A platform for managing your projects with AI. | 
|  | 4 | + | 
|  | 5 | +## Features | 
|  | 6 | + | 
|  | 7 | +*   **Authentication:** Secure user authentication using JWT. | 
|  | 8 | +*   **User Management:** Create, read, update, and delete users. | 
|  | 9 | +*   **Asynchronous:** Built with FastAPI for high performance. | 
|  | 10 | +*   **MongoDB:** Uses MongoDB as the database. | 
|  | 11 | +*   **RabbitMQ:** Uses RabbitMQ for message queuing. | 
|  | 12 | + | 
|  | 13 | +## Getting Started | 
|  | 14 | + | 
|  | 15 | +These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. | 
|  | 16 | + | 
|  | 17 | +### Prerequisites | 
|  | 18 | + | 
|  | 19 | +*   Python 3.12+ | 
|  | 20 | +*   Poetry | 
|  | 21 | +*   Docker | 
|  | 22 | + | 
|  | 23 | +### Installation | 
|  | 24 | + | 
|  | 25 | +1.  **Clone the repository:** | 
|  | 26 | + | 
|  | 27 | +    ```bash | 
|  | 28 | +    git clone https://github.com/your-username/fastapi-template.git | 
|  | 29 | +    cd fastapi-template | 
|  | 30 | +    ``` | 
|  | 31 | + | 
|  | 32 | +2.  **Run the installation script:** | 
|  | 33 | + | 
|  | 34 | +    The `install.sh` script will: | 
|  | 35 | +    *   Install `poppler-utils`. | 
|  | 36 | +    *   Install Python and Poetry if they are not already installed. | 
|  | 37 | +    *   Install project dependencies using Poetry. | 
|  | 38 | +    *   Install Docker if it is not already installed. | 
|  | 39 | +    *   Pull and run MongoDB, Redis, and RabbitMQ Docker containers. | 
|  | 40 | + | 
|  | 41 | +    ```bash | 
|  | 42 | +    bash install.sh | 
|  | 43 | +    ``` | 
|  | 44 | + | 
|  | 45 | +## Usage | 
|  | 46 | + | 
|  | 47 | +To run the FastAPI application, use the following command: | 
|  | 48 | + | 
|  | 49 | +```bash | 
|  | 50 | +make run | 
|  | 51 | +``` | 
|  | 52 | + | 
|  | 53 | +The application will be available at `http://127.0.0.1:8000`. | 
|  | 54 | + | 
|  | 55 | +## Project Structure | 
|  | 56 | + | 
|  | 57 | +``` | 
|  | 58 | +app/ | 
|  | 59 | +├── __init__.py | 
|  | 60 | +├── main.py | 
|  | 61 | +├── controllers/ | 
|  | 62 | +│   └── users.py | 
|  | 63 | +├── core/ | 
|  | 64 | +│   └── settings.py | 
|  | 65 | +├── dependencies/ | 
|  | 66 | +│   └── auth.py | 
|  | 67 | +├── middlewares/ | 
|  | 68 | +│   └── cors_middleware.py | 
|  | 69 | +├── models/ | 
|  | 70 | +│   ├── base.py | 
|  | 71 | +│   └── users.py | 
|  | 72 | +├── routers/ | 
|  | 73 | +│   ├── auths.py | 
|  | 74 | +│   └── users.py | 
|  | 75 | +├── schemas/ | 
|  | 76 | +│   ├── auths.py | 
|  | 77 | +│   └── users.py | 
|  | 78 | +├── utils/ | 
|  | 79 | +│   ├── mongodb.py | 
|  | 80 | +│   ├── rabbitmq.py | 
|  | 81 | +│   └── superuser.py | 
|  | 82 | +└── workers/ | 
|  | 83 | +    └── consumer.py | 
|  | 84 | +``` | 
|  | 85 | + | 
|  | 86 | +## Dependencies | 
|  | 87 | + | 
|  | 88 | +The project uses the following dependencies: | 
|  | 89 | + | 
|  | 90 | +*   **fastapi:** A modern, fast (high-performance), web framework for building APIs with Python 3.12+ based on standard Python type hints. | 
|  | 91 | +*   **uvicorn:** A lightning-fast ASGI server implementation. | 
|  | 92 | +*   **motor:** Asynchronous Python driver for MongoDB. | 
|  | 93 | +*   **python-jose:** A JOSE implementation in Python. | 
|  | 94 | +*   **passlib:** A library for hashing passwords. | 
|  | 95 | +*   **pydantic:** Data validation and settings management using Python type annotations. | 
|  | 96 | +*   **google-auth:** Google Authentication Library for Python. | 
|  | 97 | +*   **google-auth-oauthlib:** Google Authentication Library for Python with OAuthlib integration. | 
|  | 98 | +*   **pydantic-settings:** Pydantic settings management. | 
|  | 99 | +*   **python-multipart:** A streaming multipart parser for Python. | 
|  | 100 | +*   **aiohttp:** Asynchronous HTTP client/server framework. | 
|  | 101 | +*   **loguru:** A library which aims to bring enjoyable logging in Python. | 
|  | 102 | +*   **aio-pika:** An asynchronous AMQP client library for Python. | 
|  | 103 | + | 
|  | 104 | +## License | 
|  | 105 | + | 
|  | 106 | +This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details. | 
0 commit comments