|
16 | 16 | <summary>Key Features (Click to show details) </summary> |
17 | 17 |
|
18 | 18 | - **JWT Authentication** with refresh tokens and token blacklisting |
| 19 | +- **HashID URLs** with Base62 encoding for short, obfuscated public URLs |
19 | 20 | - **Interactive Swagger Documentation** (170+ endpoints documented) |
20 | 21 | - **Riot Games API Integration** for automatic match import and player sync |
21 | 22 | - **Advanced Analytics** (KDA trends, champion pools, vision control, etc.) |
@@ -111,6 +112,7 @@ open http://localhost:3333/api-docs |
111 | 112 | - **Rails**: 7.2.0 (API-only mode) |
112 | 113 | - **Database**: PostgreSQL 14+ |
113 | 114 | - **Authentication**: JWT (with refresh tokens) |
| 115 | +- **URL Obfuscation**: HashID with Base62 encoding |
114 | 116 | - **Background Jobs**: Sidekiq |
115 | 117 | - **Caching**: Redis (port 6380) |
116 | 118 | - **API Documentation**: Swagger/OpenAPI 3.0 (rswag) |
@@ -383,9 +385,12 @@ cp .env.example .env |
383 | 385 | Edit `.env` with your configuration: |
384 | 386 | - Database credentials |
385 | 387 | - JWT secret key |
386 | | -- Riot API key |
| 388 | +- Riot API key (get from https://developer.riotgames.com) |
| 389 | +- PandaScore API key (optional, for competitive data) |
387 | 390 | - Redis URL |
388 | 391 | - CORS origins |
| 392 | +- HashID salt (for URL obfuscation - keep secret!) |
| 393 | +- Frontend URL |
389 | 394 |
|
390 | 395 | 4. Setup the database: |
391 | 396 | ```bash |
@@ -747,12 +752,25 @@ open coverage/index.html |
747 | 752 | Required environment variables for production: |
748 | 753 |
|
749 | 754 | ```bash |
| 755 | +# Core |
750 | 756 | DATABASE_URL=postgresql://user:password@host:5432/database |
751 | 757 | REDIS_URL=redis://host:6379/0 |
| 758 | +SECRET_KEY_BASE=your-rails-secret |
| 759 | + |
| 760 | +# Authentication |
752 | 761 | JWT_SECRET_KEY=your-production-secret |
| 762 | + |
| 763 | +# External APIs |
753 | 764 | RIOT_API_KEY=your-riot-api-key |
| 765 | +PANDASCORE_API_KEY=your-pandascore-api-key |
| 766 | + |
| 767 | +# Frontend |
754 | 768 | CORS_ORIGINS=https://your-frontend-domain.com |
755 | | -SECRET_KEY_BASE=your-rails-secret |
| 769 | +FRONTEND_URL=https://your-frontend-domain.com |
| 770 | + |
| 771 | +# HashID Configuration (for URL obfuscation) |
| 772 | +HASHID_SALT=your-secret-salt |
| 773 | +HASHID_MIN_LENGTH=6 |
756 | 774 | ``` |
757 | 775 |
|
758 | 776 | ### Docker |
|
0 commit comments