tss-rocks/backend/README.md
CDN 05ddc1f783
Some checks failed
Build Backend / Build Docker Image (push) Successful in 3m33s
Test Backend / test (push) Failing after 31s
[feature] migrate to monorepo
2025-02-21 00:49:20 +08:00

69 lines
1.4 KiB
Markdown

# Tss.Rocks Backend
> [!NOTE]
> This project is still in early development, contents and functionality is incomplete.
Moderninzing the experience of TSS website.
## Getting Started
### Prerequisites
- Go 1.23 or higher
- SQLite 3
### Installation
1. Clone the repository
2. Install dependencies:
```bash
go mod download
```
3. Copy the example config file and modify it:
```bash
cp config/config.example.yaml config/config.yaml
```
4. Update the configuration in `config/config.yaml` with your settings.
### Running the Server
```bash
go run cmd/server/main.go
```
The server will start on `http://localhost:8080` by default.
## API Documentation
### Authentication
All protected endpoints require a JWT token in the Authorization header:
```
Authorization: Bearer <token>
```
### Endpoints
Checkout `api/schemas` for the OpenAPI specification.
To bundle the OpenAPI files into a single YAML file, run:
```bash
./scripts/bundle-openapi.sh # For Bash
./scripts/bundle-openapi.ps1 # For PowerShell
```
## 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 AGPL v3.0 - see the [LICENSE](LICENSE.md) file for details.