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

https://github.com/fxaviergb/nikit-server

NikIT-Server is an AI-powered platform that processes content to create quizzes, flashcards, and personalized learning tools, optimizing study sessions and improving knowledge retention.
https://github.com/fxaviergb/nikit-server

ai chatgpt java jwt rest-api spring

Last synced: about 2 months ago
JSON representation

NikIT-Server is an AI-powered platform that processes content to create quizzes, flashcards, and personalized learning tools, optimizing study sessions and improving knowledge retention.

Awesome Lists containing this project

README

          

# πŸ“š nikit-server

NikIT (Now I Know IT) Server is an AI-powered platform that processes content to create quizzes, flashcards, and personalized learning tools, optimizing study sessions and improving knowledge retention.

---

## πŸš€ Features

- **Intelligent Conversion**: Transforms content into quizzes and personalized flashcards.
- **AI Integration**: Leverages AI models to adapt learning to user needs.
- **REST API**: Provides an interactive API for web and mobile app integration.
- **Swagger Documentation**: Includes auto-generated documentation to explore and test endpoints.

---

## πŸ› οΈ Technologies

- **Language**: Java
- **Framework**: Spring Boot (version 3.4.0)
- **Dependency Management**: Maven
- **Database**: (Configurable, check project properties)
- **Security**: Spring Security with JWT
- **API Documentation**: Springdoc OpenAPI (Swagger UI)

---

## πŸ“‚ Project Structure

- **`src/main/java`**: Main server source code.
- **`src/main/resources`**: Project configurations, such as `application.properties`.
- **`pom.xml`**: Maven dependencies and project configuration.
- **`README.md`**: General project information.
- **`.mvn/`**: Maven Wrapper files for environment consistency.
- **`cicd/`**: Docker and deployment-related configuration (Dockerfile, docker-compose, scripts).

---

## βš™οΈ Setup and Execution

### **1. Prerequisites**

- **Java 17** or higher.
- **Maven 3.8** or higher (or use the included Maven Wrapper: `mvnw`).
- **Docker** and **Docker Compose** installed and running.

---

### **2. Environment Configuration**

Create a `.env` file in the `cicd/` folder with the following structure:

```env
APP_NAME=nikit-server
SERVER_PORT=8080
SPRING_PROFILES_ACTIVE=docker
MONGODB_URI=mongodb://localhost:27017/nikit
```

> Make sure MongoDB is accessible at the URI specified. You can use a local MongoDB installation or the container described below.

---

### **3. Run with Maven (Local)**

```bash
# Using Maven Wrapper (recommended)
./mvnw spring-boot:run

# Or standard Maven
mvn spring-boot:run
```

The server will be available at: `http://localhost:8080`

---

### **4. Run with Docker**

All Docker-related configuration is inside the `cicd/` folder.

#### 🧱 Build and Run

From the root of the project:

```bash
./cicd/start.sh
```

This script will:
- Compile the project with Maven
- Build the Docker image
- Start the application using Docker Compose

---

### πŸ§ͺ Optional: Run MongoDB Container for Local Testing

If you don’t have MongoDB installed locally, you can run it using Docker:

```bash
docker run -d --name mongo -p 27017:27017 -e MONGO_INITDB_DATABASE=nikit mongo:6.0
```

> Make sure your `.env` file points to: `mongodb://localhost:27017/nikit`

---

### πŸ‘€ View Running Containers

To list all running services:

```bash
docker ps
```

Or, using Docker Compose (inside `cicd/`):

```bash
docker-compose ps
```

---

### πŸ“œ View Logs

To see logs of the `nikit-server` container in real-time:

```bash
docker logs -f nikit-server
```

Or with Compose:

```bash
docker-compose logs -f nikit-server
```

To see logs of **all services**:

```bash
docker-compose logs -f
```

---

## πŸ”— API Documentation

- **Swagger UI**: `http://localhost:8080/swagger-ui`
- **OpenAPI JSON**: `http://localhost:8080/api-docs`

---

## πŸ§ͺ Testing

To run tests locally:

```bash
./mvnw test
```

---

## 🀝 Contributions

Contributions are welcome. To contribute:

1. Fork the repository.
2. Create a new branch for your changes:
```bash
git checkout -b feature/new-feature
```
3. Submit a pull request describing your changes.

---

## πŸ“œ License

This project is licensed under the [MIT License](LICENSE).

---

## πŸ›‘οΈ Author

**NikIT-Server** is maintained by the **TeamDroid** team.

---