An open API service indexing awesome lists of open source software.

https://github.com/codesparkapp/api

The backend service for CodeSpark, a gamified Java learning platform for students
https://github.com/codesparkapp/api

api backend codespark java maven spring-boot

Last synced: 2 months ago
JSON representation

The backend service for CodeSpark, a gamified Java learning platform for students

Awesome Lists containing this project

README

          

# CodeSpark - Backend

The backend service for **CodeSpark**, a gamified Java learning platform for students.
This Spring Boot application handles user authentication, lesson management, AI-powered evaluations, badge achievements, and more.

## ๐Ÿš€ Features

- ๐Ÿ“š Lesson system with multiple types
- ๐Ÿค– AI-based answer evaluation using OpenAI
- ๐Ÿง  Progress tracking and lesson skipping
- ๐Ÿ† Badge system for gamification
- ๐Ÿ” JWT-based authentication

## ๐Ÿ“ฆ Tech Stack

- Java 21 + Spring Boot
- PostgreSQL
- OpenAI
- Cloudinary
- Docker

## ๐Ÿ› ๏ธ Setup

### Prerequisites

- Java 21
- Maven
- PostgreSQL setup
- Cloudinary account
- SMTP credentials

### Environment Variables

These must be provided via environment variables:

| Key | Description |
|---------------------------------|-----------------------------------|
| `DATABASE_URL` | JDBC connection string |
| `DATABASE_USERNAME` | DB username |
| `DATABASE_PASSWORD` | DB password |
| `JWT_SECRET_KEY` | Secret for token signing |
| `SMTP_ACCOUNT_EMAIL` | SMTP account email |
| `SMTP_ACCOUNT_PASSWORD` | SMTP password |
| `OPENAI_API_KEY` | OpenAI API Key |
| `OPENAI_API_PROJECT_ID` | OpenAI Project ID |
| `OPENAI_API_ORGANIZATION_ID` | OpenAI Org ID |
| `CLOUDINARY_URL` | Cloudinary API URL |

## ๐Ÿงช Running Tests

Use the `test` Spring profile:

```bash
mvn test -Dspring.profiles.active=test
```

## ๐Ÿค Related Repositories

* [Frontend](https://github.com/CodeSparkApp/Frontend) โ€” Vaadin-based frontend
* [Organization Overview](https://github.com/CodeSparkApp)

## ๐Ÿ“œ License

Distributed under the `Attribution-NonCommercial-ShareAlike 4.0 International`. See `LICENSE` for more information.