A FastAPI server with JWT authentication and CRUD operations.
- JWT Authentication - Secure token-based auth
- CRUD Operations - Create, Read, Update, Delete items
- Swagger UI - Interactive API docs at
/docs - Pydantic Validation - Automatic request/response validation
# Clone
git clone https://github.com/MANOJ-80/0xFastAPI-Server.git
cd 0xFastAPI-Server
# Create virtual environment
python3 -m venv venv
source venv/bin/activate
# Install dependencies
pip install fastapi uvicorn python-jose[cryptography] passlib[bcrypt] python-multipart
# Run server
uvicorn app:app --reload| Method | Endpoint | Description | Auth |
|---|---|---|---|
| POST | /token |
Login, get JWT token | ❌ |
| POST | /register |
Register new user | ❌ |
| GET | /users/me |
Get current user | ✅ |
| GET | /items |
List all items | ✅ |
| GET | /items/{id} |
Get single item | ✅ |
| POST | /items |
Create item | ✅ |
| PUT | /items/{id} |
Update item | ✅ |
| DELETE | /items/{id} |
Delete item | ✅ |
Username: testuser
Password: testpass123
MIT License - See LICENSE
GitHub: MANOJ-80