This is my first FastAPI project for learning and practice. It includes user authentication, database operations with SQLite, and follows an industry-standard project structure.
- User Registration & Authentication ✅
- Password Hashing using
bcrypt🔐 - JWT Token-Based Authentication 🔑
- Database Integration with SQLAlchemy & SQLite 🛢️
- FastAPI's built-in interactive API docs 📄 (
/docs)
https://github.com/Ravikalakoti/fastapi-core.git cd fastapi-project
python -m venv venv source venv/bin/activate # On Windows, use venv\Scripts\activate
pip install -r requirements.txt
Create a .env file in the root directory and add the following:
SECRET_KEY="your_secret_key_here" ALGORITHM="HS256" ACCESS_TOKEN_EXPIRE_MINUTES=30
DATABASE_URL="sqlite:///./app.db"
alembic upgrade head
uvicorn app.main:app --reload
Your API will be available at http://127.0.0.1:8000 API documentation can be accessed at: Swagger UI: http://127.0.0.1:8000/docs Redoc: http://127.0.0.1:8000/redoc