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

https://github.com/dilfathayyil/idurar-fullstack-submission


https://github.com/dilfathayyil/idurar-fullstack-submission

docker kubernetes-deployment microservice mongodb mongoose-schema nestjs-backend nextjs reactjs

Last synced: about 1 month ago
JSON representation

Awesome Lists containing this project

README

          

# Idurar Fullstack Submission

> A full-stack application setup integrating an ERP/CRM system with a modern Next.js CRUD interface, a Nest.js/Python AI service, Dockerized deployments, and GitHub Actions CI/CD pipeline.

---

## ๐Ÿ“ Repository Structure

```bash
idurar-fullstack-submission/
โ”œโ”€โ”€ idurar-erp-crm/
โ”œโ”€โ”€ idurar-nextjs-crud/
โ”œโ”€โ”€ integration-api/
โ”œโ”€โ”€ .github/
โ”‚ โ””โ”€โ”€ workflows/
โ”‚ โ””โ”€โ”€ ci.yml
โ”œโ”€โ”€ docker-compose.yml
โ””โ”€โ”€ README.md
````

---

## ๐Ÿงฉ Project Overview

### ๐Ÿ”ท `idurar-erp-crm/`

A full ERP/CRM system based on Express.js and React. This is the core application forked from [`SMACAcademy/idurar-erp-crm`](https://github.com/SMACAcademy/idurar-erp-crm) and extended with features, bug fixes, and AI summary generation.

### ๐ŸŸข `idurar-nextjs-crud/`

A modern **Next.js 15** application for managing projects with full CRUD operations, integrated with MongoDB, Dockerized, and deployable via CI/CD. Features:

* Project listing, creation, edit, deletion
* Pagination & filtering
* Responsive UI

### ๐Ÿ”ถ `integration-api/`

A microservice API built with **Nest.js** that:

* Accepts text input
* Integrates with **Gemini AI** (Google) to summarize invoice notes or queries
* Exposes `/integration/reports/summary` endpoint

---

## ๐Ÿš€ Prerequisites

| Tool | Version |
| -------------- | ---------------------- |
| Node.js | `>=18.x` |
| Docker | `>=20.x` |
| Docker Compose | `>=2.x` |
| MongoDB | Local or MongoDB Atlas |
| Gemini API | Optional for AI |

---

## ๐Ÿ” Environment Variables

Add these to `.env` files in respective folders.

### Common variables:

```env
# MongoDB
MONGO_URI=mongodb+srv://:@cluster.mongodb.net/

# AI Integration
GEMINI_API_KEY=your_gemini_api_key

# JWT
ACCESS_TOKEN_SECRET=your_access_token_secret
REFRESH_TOKEN_SECRET=your_refresh_token_secret

# Next.js
NEXT_PUBLIC_URL=http://localhost:3000
NODE_ENV=development
PORT=3000
```

---

## ๐Ÿณ Docker & Service Setup

### ๐Ÿ”ง Run all apps together (monorepo)

```bash
docker-compose up --build
```

### ๐Ÿ“ฆ Individual builds

#### 1๏ธโƒฃ Original App (ERP/CRM)

```bash
cd idurar-erp-crm
docker-compose up --build
```

#### 2๏ธโƒฃ Next.js CRUD App

```bash
cd idurar-nextjs-crud
docker-compose up --build
```

#### 3๏ธโƒฃ Nest.js API

```bash
cd integration-api
docker-compose up --build
```

---

## ๐Ÿงช Testing

### Next.js or Nest.js:

```bash
# Unit tests
npm run test
```

---

## ๐ŸŒ Example Requests (API)

### ๐Ÿ”น CRUD Project

```bash
GET /api/projects?page=1&limit=10
POST /api/projects { "title": "AI Project", ... }
PUT /api/projects/:id { "title": "Updated" }
DELETE /api/projects/:id
```

### ๐Ÿ”ธ AI Summary (Gemini)

```bash
POST /integration/reports/summary
Body: { "notes": "This invoice includes project setup and planning..." }
```

Use Postman or cURL to test.

---

## โš™๏ธ CI/CD Pipeline (GitHub Actions)

* Triggers on pull request and push to `main`
* Steps:

* `npm ci` / `npm install`
* Lint (`eslint`)
* Run tests
* Build Docker image
* Optionally push to DockerHub or GCR

Workflow file: `.github/workflows/ci.yml`

---

## โ˜๏ธ Deployment

### DockerHub:

```bash
# Build
docker build -t yourname/project-crud .

# Push
docker push yourname/project-crud
```

---

## ๐ŸŽฅ Video Demonstration

[๐Ÿ“บ Click to Watch (Unlisted YouTube)](https://youtu.be/un3sRsQYtok)

Includes:

* CRUD UI demo
* AI integration
* Docker containers running
* GitHub Actions CI/CD workflow in action

---

## ๐Ÿ™Œ Credits

* Forked from [`SMACAcademy/idurar-erp-crm`](https://github.com/SMACAcademy/idurar-erp-crm)
* Developed by: [Dilfa Thayyil](https://github.com/dilfathayyil)

```