Link shortener api written in FastAPI.
Rename .env.example
to .env
and change variables.
Install deps:
pip install -r requirements.txt
Update migrations:
alembic upgrade +1
Run app manually:
cd server
python src/app.py
To create migrations folder:
alembic init -t async migrations
- Link endpoint
- Statistics endpoint, clicks route
- Basic statistics
- Auth
Files related to application are in the src
or tests
directories. Application parts are:
src
├── api - web related stuff.
│ ├── dependencies - dependencies for routes definition.
│ ├── errors - definition of error handlers.
│ └── routes - web routes.
├── core - application configuration, startup events, logging.
├── db - db related stuff.
│ ├── migrations - manually written alembic migrations.
│ └── repositories - all crud stuff.
├── schemas - schemas for using in web routes.
├── resources - strings, enums, constants that are used in web responses.
├── services - logic that is not just crud related.
└── main.py - FastAPI application creation and configuration.