# Trepa - Self-Hosted Streaming Platform Backend Trepa is a robust, scalable backend service written in Go for self-hosted streaming platforms. It provides the core functionality needed to manage and serve streaming content with a focus on performance, security, and ease of deployment. ## Features - User account management with JWT authentication - Movie/Content metadata management - PostgreSQL database for persistent storage - Docker support for easy deployment - Database migrations system - Scalable architecture ## Prerequisites - Go 1.24 or higher - PostgreSQL database - Docker (for containerized deployment) - migrate CLI tool (for database migrations) ## Environment Variables Create a `.env` file in the root directory with the following variables: ```env DB_HOST=your_database_host DB_PORT=your_database_port DB_USER=your_database_user DB_PASSWORD=your_database_password DB_NAME=your_database_name JWT_SECRET=your_jwt_secret ``` ## Installation 1. Clone the repository: ```bash git clone cd trepa ``` 2. Install dependencies: ```bash go mod download ``` 3. Run database migrations: ```bash migrate -path migrations -database "postgresql://user:password@localhost:5432/dbname?sslmode=disable" up ``` ## Development To run the project locally: ```bash go run cmd/main.go ``` ## Docker Deployment Build and run the Docker container: ```bash docker build -t trepa . docker run -p 8080:8080 --env-file .env trepa ``` ## Project Structure ``` . ├── cmd/ # Application entrypoints ├── internal/ # Private application code │ ├── accounts/ # User account management │ └── core/ # Core business logic ├── migrations/ # Database migrations ├── scripts/ # Build and deployment scripts └── test/ # Test files ``` ## API Documentation [API documentation to be added] ## Contributing 1. Fork the repository 2. Create your feature branch (`git checkout -b feature/amazing-feature`) 3. Commit your changes (`git commit -m 'Add some amazing feature'`) 4. Push to the branch (`git push origin feature/amazing-feature`) 5. Open a Pull Request ## License This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details. ## Security For security concerns, please open an issue or contact the maintainers directly. ## Support For support, please open an issue in the repository.