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
- Host: GitHub
- URL: https://github.com/dilfathayyil/idurar-fullstack-submission
- Owner: DilfaThayyil
- Created: 2025-07-27T14:02:06.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2025-07-29T07:11:16.000Z (8 months ago)
- Last Synced: 2025-09-05T03:44:09.651Z (7 months ago)
- Topics: docker, kubernetes-deployment, microservice, mongodb, mongoose-schema, nestjs-backend, nextjs, reactjs
- Language: JavaScript
- Homepage:
- Size: 893 KB
- Stars: 3
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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)
```