No description
.devcontainer | ||
.vscode | ||
.woodpecker | ||
cmd | ||
internal | ||
migrations | ||
scripts | ||
test | ||
.gitignore | ||
Dockerfile | ||
go.mod | ||
go.sum | ||
LICENSE | ||
README.md |
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:
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
- Clone the repository:
git clone <repository-url>
cd trepa
- Install dependencies:
go mod download
- Run database migrations:
migrate -path migrations -database "postgresql://user:password@localhost:5432/dbname?sslmode=disable" up
Development
To run the project locally:
go run cmd/main.go
Docker Deployment
Build and run the Docker container:
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
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add some amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
License
This project is licensed under the MIT License - see the 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.