Skip to content

Commit 65341e2

Browse files
authored
Merge pull request #50 from igorbenav/igorbenav-patch-1
Update README.md
2 parents d416300 + c1ef6be commit 65341e2

File tree

1 file changed

+73
-69
lines changed

1 file changed

+73
-69
lines changed

README.md

Lines changed: 73 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -410,96 +410,100 @@ poetry run alembic upgrade head
410410
### 5.1 Project Structure
411411
First, you may want to take a look at the project structure and understand what each file is doing.
412412
```sh
413-
. # FastAPI-boilerplate folder. Rename it to suit your project name
414-
├── Dockerfile # Dockerfile for building the application container.
415-
├── LICENSE.md # License file for the project.
416-
├── README.md # Project README providing information and instructions.
417-
├── docker-compose.yml # Docker Compose file for defining multi-container applications.
413+
. # FastAPI-boilerplate folder. Rename it to suit your project name
414+
├── Dockerfile # Dockerfile for building the application container.
415+
├── LICENSE.md # License file for the project.
416+
├── README.md # Project README providing information and instructions.
417+
├── docker-compose.yml # Docker Compose file for defining multi-container applications.
418418
419-
└── src # Source code directory.
420-
├── __init__.py # Initialization file for the src package.
421-
├── alembic.ini # Configuration file for Alembic (database migration tool).
422-
├── poetry.lock # Poetry lock file specifying exact versions of dependencies.
423-
├── pyproject.toml # Configuration file for Poetry, lists project dependencies.
419+
└── src # Source code directory.
420+
├── __init__.py # Initialization file for the src package.
421+
├── alembic.ini # Configuration file for Alembic (database migration tool).
422+
├── poetry.lock # Poetry lock file specifying exact versions of dependencies.
423+
├── pyproject.toml # Configuration file for Poetry, lists project dependencies.
424424
425-
├── app # Main application directory.
426-
│ ├── __init__.py # Initialization file for the app package.
427-
│ ├── main.py # Entry point that imports and creates the FastAPI application instance.
428-
│ ├── worker.py # Worker script for handling background tasks.
425+
├── app # Main application directory.
426+
│ ├── __init__.py # Initialization file for the app package.
427+
│ ├── main.py # Entry point that imports and creates the FastAPI application instance.
428+
│ ├── worker.py # Worker script for handling background tasks.
429429
│ │
430-
│ ├── api # Folder containing API-related logic.
430+
│ ├── api # Folder containing API-related logic.
431431
│ │ ├── __init__.py
432-
│ │ ├── dependencies.py # Defines dependencies that can be reused across the API endpoints.
433-
│ │ ├── exceptions.py # Contains custom exceptions for the API.
434-
│ │ ├── paginated.py # Utilities for paginated responses in APIs.
432+
│ │ ├── dependencies.py # Defines dependencies that can be reused across the API endpoints.
433+
│ │ ├── exceptions.py # Contains custom exceptions for the API.
434+
│ │ ├── paginated.py # Utilities for paginated responses in APIs.
435435
│ │ │
436-
│ │ └── v1 # Version 1 of the API.
436+
│ │ └── v1 # Version 1 of the API.
437437
│ │ ├── __init__.py
438-
│ │ ├── login.py # API routes related to user login.
439-
│ │ ├── posts.py # API routes related to posts.
440-
│ │ ├── rate_limits.py # API routes for rate limiting features.
441-
│ │ ├── tasks.py # API routes related to background tasks.
442-
│ │ ├── tiers.py # API routes for handling different user tiers.
443-
│ │ └── users.py # API routes related to user management.
438+
│ │ ├── login.py # API routes related to user login.
439+
│ │ ├── posts.py # API routes related to posts.
440+
│ │ ├── rate_limits.py # API routes for rate limiting features.
441+
│ │ ├── tasks.py # API routes related to background tasks.
442+
│ │ ├── tiers.py # API routes for handling different user tiers.
443+
│ │ └── users.py # API routes related to user management.
444444
│ │
445-
│ ├── core # Core utilities and configurations for the application.
445+
│ ├── core # Core utilities and configurations for the application.
446446
│ │ ├── __init__.py
447-
│ │ ├── cache.py # Utilities related to caching.
448-
│ │ ├── config.py # Application configuration settings.
449-
│ │ ├── database.py # Database connectivity and session management.
450-
│ │ ├── exceptions.py # Contains core custom exceptions for the application.
451-
│ │ ├── logger.py # Logging utilities.
452-
│ │ ├── models.py # Base models for the application.
453-
│ │ ├── queue.py # Utilities related to task queues.
454-
│ │ ├── rate_limit.py # Rate limiting utilities and configurations.
455-
│ │ ├── security.py # Security utilities like password hashing and token generation.
456-
│ │ └── setup.py # File defining settings and FastAPI application instance definition.
447+
│ │ ├── cache.py # Utilities related to caching.
448+
│ │ ├── config.py # Application configuration settings.
449+
│ │ ├── database.py # Database connectivity and session management.
450+
│ │ ├── exceptions.py # Contains core custom exceptions for the application.
451+
│ │ ├── logger.py # Logging utilities.
452+
│ │ ├── models.py # Base models for the application.
453+
│ │ ├── queue.py # Utilities related to task queues.
454+
│ │ ├── rate_limit.py # Rate limiting utilities and configurations.
455+
│ │ ├── security.py # Security utilities like password hashing and token generation.
456+
│ │ └── setup.py # File defining settings and FastAPI application instance definition.
457457
│ │
458-
│ ├── crud # CRUD operations for the application.
458+
│ ├── crud # CRUD operations for the application.
459459
│ │ ├── __init__.py
460-
│ │ ├── crud_base.py # Base CRUD operations class that can be extended by other CRUD modules.
461-
│ │ ├── crud_posts.py # CRUD operations for posts.
462-
│ │ ├── crud_rate_limit.py # CRUD operations for rate limiting configurations.
463-
│ │ ├── crud_tier.py # CRUD operations for user tiers.
464-
│ │ ├── crud_users.py # CRUD operations for users.
465-
│ │ └── helper.py # Helper functions for CRUD operations.
460+
│ │ ├── crud_base.py # Base CRUD operations class that can be extended by other CRUD modules.
461+
│ │ ├── crud_posts.py # CRUD operations for posts.
462+
│ │ ├── crud_rate_limit.py # CRUD operations for rate limiting configurations.
463+
│ │ ├── crud_tier.py # CRUD operations for user tiers.
464+
│ │ ├── crud_users.py # CRUD operations for users.
465+
│ │ └── helper.py # Helper functions for CRUD operations.
466466
│ │
467-
│ ├── models # ORM models for the application.
467+
│ ├── middleware # Middleware folder
468+
│ └── client_cache_middleware.py # Middleware for client side cache
469+
│ │
470+
│ │
471+
│ ├── models # ORM models for the application.
468472
│ │ ├── __init__.py
469-
│ │ ├── post.py # ORM model for posts.
470-
│ │ ├── rate_limit.py # ORM model for rate limiting configurations.
471-
│ │ ├── tier.py # ORM model for user tiers.
472-
│ │ └── user.py # ORM model for users.
473+
│ │ ├── post.py # ORM model for posts.
474+
│ │ ├── rate_limit.py # ORM model for rate limiting configurations.
475+
│ │ ├── tier.py # ORM model for user tiers.
476+
│ │ └── user.py # ORM model for users.
473477
│ │
474-
│ ├── schemas # Pydantic schemas for data validation.
478+
│ ├── schemas # Pydantic schemas for data validation.
475479
│ │ ├── __init__.py
476-
│ │ ├── job.py # Schemas related to background jobs.
477-
│ │ ├── post.py # Schemas related to posts.
478-
│ │ ├── rate_limit.py # Schemas for rate limiting configurations.
479-
│ │ ├── tier.py # Schemas for user tiers.
480-
│ │ └── user.py # Schemas related to users.
480+
│ │ ├── job.py # Schemas related to background jobs.
481+
│ │ ├── post.py # Schemas related to posts.
482+
│ │ ├── rate_limit.py # Schemas for rate limiting configurations.
483+
│ │ ├── tier.py # Schemas for user tiers.
484+
│ │ └── user.py # Schemas related to users.
481485
│ │
482-
│ └── logs # Directory for log files.
483-
│ └── app.log # Application log file.
486+
│ └── logs # Directory for log files.
487+
│ └── app.log # Application log file.
484488
485-
├── migrations # Directory for Alembic migrations.
486-
│ ├── README # General info and guidelines for migrations.
487-
│ ├── env.py # Environment configurations for Alembic.
488-
│ ├── script.py.mako # Template script for migration generation.
489+
├── migrations # Directory for Alembic migrations.
490+
│ ├── README # General info and guidelines for migrations.
491+
│ ├── env.py # Environment configurations for Alembic.
492+
│ ├── script.py.mako # Template script for migration generation.
489493
│ │
490-
│ └── versions # Folder containing individual migration scripts.
494+
│ └── versions # Folder containing individual migration scripts.
491495
│ └── README.MD
492496
493-
├── scripts # Utility scripts for the project.
497+
├── scripts # Utility scripts for the project.
494498
│ ├── __init__.py
495-
│ ├── create_first_superuser.py # Script to create the first superuser in the application.
496-
│ └── create_first_tier.py # Script to create the first user tier in the application.
499+
│ ├── create_first_superuser.py # Script to create the first superuser in the application.
500+
│ └── create_first_tier.py # Script to create the first user tier in the application.
497501
498-
└── tests # Directory containing all the tests.
499-
├── __init__.py # Initialization file for the tests package.
500-
├── conftest.py # Configuration and fixtures for pytest.
501-
├── helper.py # Helper functions for writing tests.
502-
└── test_user.py # Tests related to the user model and endpoints.
502+
└── tests # Directory containing all the tests.
503+
├── __init__.py # Initialization file for the tests package.
504+
├── conftest.py # Configuration and fixtures for pytest.
505+
├── helper.py # Helper functions for writing tests.
506+
└── test_user.py # Tests related to the user model and endpoints.
503507
```
504508

505509
### 5.2 Database Model

0 commit comments

Comments
 (0)