Skip to content

Latest commit

Β 

History

92 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ€– Aile - Mark - I

An AI-powered conversational assistant built with the MERN stack, featuring secure authentication, persistent conversation history, and workflow-driven responses using n8n. The workflow architecture allows the underlying AI provider to be swapped or extended without changing the application code.

Version Status License PRs


🌐 Frontend

πŸš€ Live Demo

βš™οΈ Backend API

πŸ”— Render API


πŸ“– About The Project

Aile Mark 1 is a production-oriented AI conversation platform designed to simulate the architecture of modern AI assistants.

Instead of focusing only on AI responses, the project emphasizes secure authentication, conversation persistence, scalable backend architecture, and workflow automation through n8n.

It demonstrates how modern AI applications can be built using industry-standard technologies including React, Express.js, MongoDB Atlas, JWT authentication, and cloud deployment platforms.


✨ Key Highlights

  • πŸ” JWT Authentication & Protected Routes
  • πŸ€– AI-powered Conversations
  • πŸ’¬ Persistent Conversation History
  • πŸ“‚ User-specific Chat Management
  • 🎨 Responsive Modern Interface
  • πŸŒ™ Dark & High Contrast Themes
  • ☁️ Cloud Deployment
  • ⚑ MERN Architecture
  • πŸ”„ n8n Workflow Integration

πŸ“Έ Application Preview

πŸ”‘ Login

Authenticate securely using JWT-based authentication.

Login


πŸ“ Register

Create an account with client-side and server-side validation.

Register


πŸ€– AI Chat Workspace

Modern AI chat interface with persistent conversation history.

Chat


πŸš€ Features

πŸ€– AI Conversation

  • AI-powered responses using n8n workflows
  • Persistent chat history
  • Markdown message rendering
  • Session-based conversations
  • Copy message functionality
  • Like / Dislike interactions

πŸ” Authentication & Security

  • User Registration
  • Secure Login
  • Password Hashing (bcrypt)
  • JWT Authentication
  • Protected Routes
  • Authentication Middleware

πŸ’¬ Conversation Management

  • User-specific conversations
  • Automatic conversation titles
  • Persistent MongoDB storage
  • Conversation history
  • Delete conversations
  • Session restoration

🎨 User Experience

  • Responsive Layout
  • Sidebar Navigation
  • Message timestamps
  • Dark Theme
  • High Contrast Theme
  • Persistent Login Session

☁️ Deployment

  • Netlify Frontend
  • Render Backend
  • MongoDB Atlas Database
  • Railway n8n Workflow

πŸ› οΈ Tech Stack

Frontend

  • React.js
  • Vite
  • JavaScript
  • React Router
  • CSS

Backend

  • Node.js
  • Express.js
  • MongoDB
  • Mongoose

Authentication

  • JWT
  • bcrypt

AI Workflow

  • n8n

Deployment

  • Netlify
  • Render
  • Railway
  • MongoDB Atlas

πŸ—οΈ System Architecture

                β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                β”‚       Browser      β”‚
                β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                          β”‚
                          β–Ό
              React + Vite Frontend
                     (Netlify)
                          β”‚
                REST API (Axios)
                          β”‚
                          β–Ό
                Express.js Backend
                     (Render)
                  β”Œβ”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”
                  β–Ό                β–Ό
          MongoDB Atlas      n8n Workflow

πŸ“‚ Project Structure

AILE-MARK-1/

β”œβ”€β”€ backend/
β”‚   β”œβ”€β”€ controllers/
β”‚   β”œβ”€β”€ middleware/
β”‚   β”œβ”€β”€ models/
β”‚   β”œβ”€β”€ routes/
β”‚   β”œβ”€β”€ app.js
β”‚   └── package.json
β”‚
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ assets/
β”‚   β”œβ”€β”€ components/
β”‚   β”œβ”€β”€ pages/
β”‚   β”œβ”€β”€ services/
β”‚   β”œβ”€β”€ utils/
β”‚   β”œβ”€β”€ App.jsx
β”‚   └── main.jsx
β”‚
β”œβ”€β”€ public/
β”œβ”€β”€ package.json
└── README.md

πŸ”Œ API Overview

Authentication

POST /api/auth/register
POST /api/auth/login

Conversations

GET    /api/conversations
GET    /api/conversation/:sessionId
POST   /api/chat
DELETE /api/conversations/:sessionId

βš™οΈ Environment Variables

Backend

PORT=8000

MONGODB_URI=<your_mongodb_connection_string>

JWT_SECRET=<your_jwt_secret>

N8N_WEBHOOK_URL=<your_n8n_webhook_url>

Frontend

VITE_API_URL=<your_backend_api_url>

πŸš€ Installation

Clone Repository

git clone https://github.com/iamHaneef/aile-mark-1.git

Install Frontend

npm install

Install Backend

cd backend

npm install

Start Development

Frontend

npm run dev

Backend

cd backend

npm run dev

βœ… Project Modules

Phase 1 β€” Authentication

Phase 2 β€” Conversation System

Phase 3 β€” User Interface

Phase 4 β€” Deployment


⚑ Challenges

  • Maintaining secure conversation ownership
  • Persisting chat sessions across refreshes
  • Managing JWT expiration
  • Integrating asynchronous AI workflows
  • Deploying frontend, backend, database, and workflow services together

πŸ“š What I Learned

Through this project, I strengthened my understanding of:

  • MERN Stack Development
  • REST API Design
  • JWT Authentication
  • MongoDB Schema Design
  • Express Middleware
  • Cloud Deployment
  • AI Workflow Automation
  • Full-Stack Application Architecture

πŸ“„ License

This project is intended for learning, portfolio, and educational purposes.


πŸ‘¨β€πŸ’» Author

Haneef

⭐ Star this repository if you found it useful!

About

Production-ready AI assistant built with React, Express, MongoDB, and n8n featuring secure authentication and persistent conversations.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Packages

Used by

Contributors

Languages