TinyGallery Backend is a RESTful API built using FastAPI that powers the TinyGallery Vue Edition. It provides comprehensive functionality for managing images, posts, users, and more.
app/
: Contains the main application code.dependencies/
: Dependency injection and database setup.model/
: Database models and schemas.routers/
: API route handlers.utilities/
: Utility functions and tools.
docs/
: Contains documentation for the project.tests/
: Contains unit and integration tests.
- User authentication and authorization
- Image upload and management
- Post creation and management
- Comment system
- Like functionality
- User profile management
- Admin panel for user and content management
- Avatar and background image customization
- Python 3.6+
- FastAPI
- SQLAlchemy (with SQLite)
- Pydantic for data validation
- JWT for authentication
- Pillow for image processing
For detailed setup instructions, please refer to our Get Started Guide.
Quick start:
- Clone the repository
- Set up a virtual environment
- Install dependencies
- Configure environment variables
- Initialize the database
- Run the development server
git clone https://github.com/WeepingDogel/tinygallery-backend.git
cd tinygallery-backend
python -m venv venv
source venv/bin/activate # On Windows, use `venv\Scripts\activate`
pip install -r requirements.txt
# Configure .env file
python -c "from app.model import models; from app.dependencies.db import engine; models.Base.metadata.create_all(bind=engine)"
uvicorn app.main:app --reload
Once the server is running, you can access the Swagger UI documentation at http://localhost:8000/docs
.
For a more detailed API reference, see our API Documentation.
For information on deploying TinyGallery Backend to a production environment, please refer to our Deployment Guide.
We use a comprehensive CI/CD pipeline to ensure code quality and automate the deployment process. For more details, see our Pipeline Documentation.
We welcome contributions to TinyGallery Backend! Please see our Contributing Guide for more details on how to get started.
For information about our security policy and how to report security vulnerabilities, please see our Security Policy.
This project is licensed under the MIT License - see the LICENSE file for details.
If you encounter any problems or have any questions, please open an issue on our GitHub Issues page.
- FastAPI for the awesome web framework
- SQLAlchemy for the ORM
- Pillow for image processing
- All our contributors and users!