A REST API for your TCG (Trading Card Game) client. You can also use the companion client: TcgPlatformClient.
- .NET 8
- Entity Framework Core
- PostgreSQL
- JWT
- BCrypt
- xUnit
- Moq
- Avatar selection in Swagger
- Email filter
- Image format filter
- Custom exception
- Exception middleware
POST /api/avatar/uploadavatar
GET /api/avatar/getavatar
POST /api/booster/addboosters
GET /api/booster/getallboosters
POST /api/booster/removeboosters
POST /api/card/addcards
GET /api/card/getallcards
POST /api/card/removecards
POST /api/deck/addorupdatedecks
POST /api/deck/removedecks
GET /api/deck/getdeck
GET /api/deck/getalldecks
POST /api/email/email
GET /api/profile/getprofile
POST /api/profile/createprofile
POST /api/profile/updateprofile
POST /api/regverlog/register
POST /api/regverlog/verify
POST /api/regverlog/login
POST /api/regverlog/resetpassword
POST /api/regverlog/verifyresetpassword
POST /api/token/refreshtoken
- Clone the repository:
git clone https://github.com/CYHTF7/TcgPlatformApi.git
- Create user secrets:
dotnet user-secrets init
- Go to secters and setup:
{ "ConnectionStrings": { "DefaultConnection": "Host=localhost; Port=5432; Database=your_db_name; Username=your_db_username; Password=your_db_password" }, "SmtpSettings": { "Host": "smtp.your_email_provider.com", "Port": 587, "Username": "your_email@example.com", "Password": "your_app_password", "EnableSsl": true }, "JwtSettings": { "SecretKey": "your_jwt_secret_key", "RefreshTokenSecret": "your_refresh_token_key", "Issuer": "your_app_name_or_url", "Audience": "your_client_app_name", "ExpiresInHours": 2, "RefreshTokenExpiresInDays": 7 } }
- Create migration:
dotnet tool install --global dotnet-ef dotnet ef migrations add AddRegistrationFields dotnet ef database update
- Run:
dotnet run --launch-profile "https"
←(°▽°)→