('-. .-') _ .-')
( OO ).-. ( OO ).( '.( OO )_
,------./ . --. /(_)---\_),--. ,--.).-'),-----.
('-| _.---'| \-. \ / _ | | `.' |( OO' .-. '
(OO|(_\ .-'-' | |\ :` `. | |/ | | | |
/ | '--.\| |_.' | '..`''.)| |'.'| |\_) | |\| |
\_)| .--' | .-. |.-._) \| | | | \ | | | |
\| |_) | | | |\ /| | | | `' '-' '
`--' `--' `--' `-----' `--' `--' `-----'
FASMO - FastAPI SvelteKit MongoDB
The project structure for the backend is inspired by this repository.
The frontend of the project is built using SvelteKit, initialized with the command:
npm create svelte@latest fasmo
If you have make installed, follow these steps:
1. Create and edit environment files
cp .env.example .env
cp frontend/.env.example frontend/.envUpdate the values in both .env files as needed.
2. Install and Run
# Install all dependencies (Backend & Frontend)
make install
# Run both Backend and Frontend
make dev
# Run quality checks (Linting & Tests)
make check1. Create the .env File
Create and update .env file based on .env.example:
cp .env.example .envUpdate the values in the .env file as needed.
2. Setup Environment
Using Makefile:
make install-beAlternatively, manual steps:
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements/base.txt -r requirements/dev.txt3. Run the backend
Run the server using Makefile:
make dev-beOr manually:
sh scripts/start-dev.sh4. Open the API Documentation
The API documentation can be opened in a browser at the following address:
http://localhost:8000/docs
1. Create the .env File
Create and update .env file based on .env.example:
cp frontend/.env.example frontend/.envUpdate the values in the .env file as needed.
2. Install dependencies
Using Makefile:
make install-feOr manually:
cd frontend
npm install3. Run the frontend
Using Makefile:
make dev-feOr manually:
cd frontend
npm run devTo ensure code quality and consistency.
Using Makefile:
# Run all checks
make check
# Run only backend checks
make check-be
# Run only frontend checks
make check-feOr manually:
Backend:
sh scripts/lint-format.sh
pytestFrontend:
cd frontend
npm run check
npm run format
npm run lintIf you have Docker installed and want to run the project locally using containers:
1. Create and edit environment files
cp .env.example .env
cp frontend/.env.example frontend/.envUpdate the values in both .env files as needed.
2. Run with Makefile
# Start in development mode
make docker-dev
# Start in production mode
make docker-prod3. Access the app
- Frontend: http://localhost:5050
- Backend: http://localhost:8000
For detailed production deployment instructions, including VPS setup and CI/CD, please refer to DEPLOYMENT.md.