Synthra is a file hosting application built using FastAPI (with Python >= 3.11) and SvelteKit, with PostgreSQL, SQLAlchemy and Alembic.
This repository contains both the frontend and the backend of the project in their respective folders.
This is a project for the courses Implementation of free and open source systems
and Team project
.
See DOCUMENTATION.md.
Authors:
- Stefan Milev - 206055
- Alek Jarmov - 206012
- Ana Marija Atanasovska - 206004
- Danilo Najkov - 206033
- File hosting
- File previews
- File whitelist
- File expiration
- File quotas
- Roles
- Encryption
- 2FA
- User registration and login
- Intuitive interface
- Support for webhooks
- Account panel
- Administrative panel
- ShareX integration
- Themes
See also FEATURES.md.
For running the application in production mode, it's highly recommended to use Docker. Otherwise, the manual setup is also available for those who wish to test the application in a development environment.
For most users, just these few steps should be sufficient, provided that you are comfortable with using Docker for deploying applications.
- Grab the
docker-compose.prod.yaml
file from the repository - Rename it to
docker-compose.yaml
- Run
docker compose up -d
To setup your environment and the project for development:
- Run
poetry install --no-root
(while inside thebackend
folder) - Run
pre-commit install
- Run
cd backend
- Run
poetry run pytest
- Run
cd frontend
- Run
npm run test
The project contains two Docker Compose configurations. docker-compose.yaml
is for the development environment, and docker-compose.prod.yaml
is for the production environment.
While building the frontend, the environment variable VITE_BASE_URL
should be present, which is the URL to the API. You can also add this to the global .env
file.
- Run
git clone git@github.com:Delemangi/synthra.git
(orgit clone https://github.com/Delemangi/synthra.git
) - Run
docker compose build
The manual setup requires that you have the following requirements installed:
- Python >= v3.11
- Poetry
- Node.js >= v20
- PostgreSQL >= v16
Once you have all these dependencies installed, then:
- Run
git clone git@github.com:Delemangi/synthra.git
(orgit clone https://github.com/Delemangi/synthra.git
) - Next, you have to install each module separately.
- Navigate to the
backend
folder:cd backend
- Run
poetry install --no-root
- Navigate to the
frontend
folder:cd frontend
- Run
npm i
- Run
npm run build
- Copy or rename the
.env.sample
file to.env
, and edit it to your liking, or leave it as is - Run
docker compose up -d
- Start the PostgreSQL service
- Apply all migrations:
alembic upgrade head
- Start the backend service
- Open the project in your terminal
- Run
cd backend
- Run
python -m app.main
- Start the frontend service
- Open the project in your terminal
- Run
cd frontend
- If you would like to start the application in a development environment with hot reloading, then run
npm run dev
, otherwisenpm run preview
, provided that you have runnpm run build
previously
This project is licensed under the MIT license.