update docs

This commit is contained in:
Fran Jurmanović
2025-07-29 20:50:57 +02:00
parent 647f4f7487
commit 90aa63fc99
34 changed files with 5697 additions and 5905 deletions

124
README.md
View File

@@ -1,135 +1,97 @@
# ACC Server Manager
A comprehensive web-based management system for Assetto Corsa Competizione (ACC) dedicated servers.
A web-based management system for Assetto Corsa Competizione (ACC) dedicated servers on Windows.
## 🚀 Quick Start
## Quick Start
### Prerequisites
- Windows 10/11 or Windows Server 2016+
- Go 1.23.0+
- Administrative privileges
- [SteamCMD](https://developer.valvesoftware.com/wiki/SteamCMD#Downloading_SteamCMD)
- [NSSM](https://nssm.cc/download) (for Windows service management)
### Installation
1. **Clone and Build**
1. **Clone and build**
```bash
git clone <repository-url>
cd acc-server-manager
go mod download
go build -o api.exe cmd/api/main.go
```
2. **Set Environment Variables**
```powershell
# Set tool paths (optional - defaults will be used if not set)
$env:STEAMCMD_PATH = "C:\steamcmd\steamcmd.exe"
$env:NSSM_PATH = ".\nssm.exe"
```
3. **Generate Configuration**
2. **Generate configuration**
```powershell
# Windows PowerShell
.\scripts\generate-secrets.ps1
# Or manually copy and edit
copy .env.example .env
```
4. **Run Application**
3. **Run**
```bash
./api.exe
```
Access at: http://localhost:3000
Access the web interface at: http://localhost:3000
## ✨ Key Features
## Features
- **Multi-Server Management** - Manage multiple ACC servers from one interface
- **Steam Integration** - Automated server installation and updates
- **Real-time Monitoring** - Live server status and performance metrics
- **Advanced Security** - JWT authentication, role-based access, rate limiting
- **Configuration Management** - Web-based configuration editor
- **Service Integration** - Windows Service management
- **Web Configuration** - Edit server settings through the browser
- **Windows Services** - Run servers as Windows services
- **Security** - JWT authentication and encrypted credential storage
- **Interactive API** - Swagger UI for API testing and documentation
## 🔧 Configuration
## Configuration
### Environment Variables
The application uses environment variables for tool configuration:
The application uses these environment variables:
| Variable | Description | Default |
|----------|-------------|---------|
| `STEAMCMD_PATH` | Path to SteamCMD executable | `c:\steamcmd\steamcmd.exe` |
| `NSSM_PATH` | Path to NSSM executable | `.\nssm.exe` |
| `STEAMCMD_PATH` | Path to SteamCMD | `c:\steamcmd\steamcmd.exe` |
| `NSSM_PATH` | Path to NSSM | `.\nssm.exe` |
| `PORT` | Web server port | `3000` |
For detailed configuration information, see [Environment Variables Documentation](documentation/ENVIRONMENT_VARIABLES.md).
Security keys are automatically generated by the setup script.
## 🏗️ Architecture
## API Documentation
- **Backend**: Go + Fiber web framework
- **Database**: SQLite with GORM
- **Authentication**: JWT with bcrypt
- **API**: RESTful with Swagger documentation
### Interactive Swagger UI
## 📚 Documentation
Access the comprehensive API documentation with testing capabilities at:
- **Swagger UI**: http://localhost:3000/swagger/
- **OpenAPI Spec**: http://localhost:3000/swagger/doc.json
Comprehensive documentation is available in the [`documentation/`](documentation/) folder:
The Swagger interface allows you to:
- Test API endpoints directly from your browser
- View request/response examples
- Authenticate and test protected endpoints
- Generate client libraries from the OpenAPI spec
- **[Detailed README](documentation/DETAILED_README.md)** - Complete setup and usage guide
- **[Logging System](documentation/LOGGING_IMPLEMENTATION_SUMMARY.md)** - Enhanced error handling and logging
- **[Security Guide](documentation/SECURITY.md)** - Security features and best practices
- **[Configuration](documentation/CONFIGURATION.md)** - Advanced configuration options
- **[API Documentation](documentation/API.md)** - Complete API reference
- **[Deployment Guide](documentation/DEPLOYMENT.md)** - Production deployment instructions
- **[Migration Guides](documentation/)** - Database and feature migration instructions
For detailed API usage, see [API Reference](docs/API.md) and [Swagger Guide](docs/SWAGGER.md).
## 🔒 Security Features
- JWT token authentication
- Role-based access control
- AES-256 encryption for sensitive data
- Comprehensive input validation
- Rate limiting and DoS protection
- Security headers and CORS protection
## 🛠️ Development
## Development
```bash
# Development with hot reload
# Install hot-reload tool
go install github.com/cosmtrek/air@latest
# Run with hot reload
air
# Run tests
go test ./...
# API Documentation
# Visit: http://localhost:3000/swagger/
```
## 📝 Environment Variables
## Documentation
Required variables (auto-generated by scripts):
- `JWT_SECRET` - JWT signing secret
- `APP_SECRET` - Application secret key
- `ENCRYPTION_KEY` - AES encryption key
- [Setup Guide](docs/SETUP.md) - Detailed installation instructions
- [Configuration](docs/CONFIG.md) - Advanced configuration options
- [API Reference](docs/API.md) - API endpoints and authentication
- [Swagger Guide](docs/SWAGGER.md) - Interactive API documentation
- [Troubleshooting](docs/TROUBLESHOOTING.md) - Common issues and solutions
Optional:
- `PORT` - HTTP port (default: 3000)
- `DB_NAME` - Database file (default: acc.db)
- `CORS_ALLOWED_ORIGIN` - CORS origins
## License
## 🤝 Contributing
1. Fork the repository
2. Create feature branch: `git checkout -b feature/name`
3. Make changes and add tests
4. Submit pull request
## 📄 License
MIT License - see [LICENSE](LICENSE) file for details.
---
For detailed documentation, troubleshooting, and advanced configuration, see the [`documentation/`](documentation/) folder.
**Happy Racing! 🏁**
MIT License - see [LICENSE](LICENSE) file for details.