# User Authentication Service A FastAPI-based user authentication service with JWT token support and SQLite database. ## Features - User registration and login - JWT token-based authentication - Password hashing with bcrypt - SQLite database with SQLAlchemy ORM - Database migrations with Alembic - CORS enabled for all origins - Health check endpoint - API documentation at `/docs` and `/redoc` ## Installation 1. Install dependencies: ```bash pip install -r requirements.txt ``` 2. Set up environment variables (optional): ```bash export SECRET_KEY="your-secret-key-here" export ACCESS_TOKEN_EXPIRE_MINUTES="30" ``` ## Running the Application Start the development server: ```bash uvicorn main:app --reload ``` The API will be available at `http://localhost:8000` ## API Endpoints - `GET /` - Service information - `POST /auth/register` - Register a new user - `POST /auth/login` - Login and get access token - `GET /auth/me` - Get current user info (requires authentication) - `GET /health` - Health check endpoint - `GET /docs` - Interactive API documentation - `GET /redoc` - Alternative API documentation ## Environment Variables - `SECRET_KEY` - Secret key for JWT token signing (default: "your-secret-key-change-this-in-production") - `ACCESS_TOKEN_EXPIRE_MINUTES` - Token expiration time in minutes (default: 30) ## Database The application uses SQLite database stored at `/app/storage/db/db.sqlite`. Database migrations are managed with Alembic.