EndAI is an intelligent and responsive web application that empowers developers to generate complete coding projects β including boilerplate code and detailed project descriptions β with a single prompt. It uses Google Gemini AI to generate production-ready code and markdown-based explanations, making it an ideal tool for developers, learners, and creators looking to kickstart new ideas quickly.
-
βοΈ AI-Powered Generation
Instantly generate project code and accompanying markdown descriptions using the Google Gemini API. -
π Project Management System
Seamlessly create, save, and switch between multiple projects in a user-friendly sidebar layout. -
π Typing Animation Effect
Realistic typewriter animation enhances the experience when displaying newly generated content. -
π§ Smart Memory Handling
Previously saved projects load instantly without the typing animation, making the UX feel more efficient. -
π‘ Live Syntax Highlighting
Use of Prism.js ensures beautifully highlighted code blocks for better readability. -
π Markdown Description Rendering
Descriptions are rendered using React Markdown for rich-text formatting and readability. -
π± Mobile Responsive
Fully responsive UI ensures smooth experience on both desktop and mobile devices. -
π One-Click Copy Buttons
Instantly copy the code or description with a click for faster integration into your workflow.
Category | Technologies Used |
---|---|
Frontend | React.js, Vite, Tailwind CSS |
AI Integration | Google Gemini API (free-tier support) |
Animations | Framer Motion |
Code Highlighting | Prism.js |
Markdown Renderer | React Markdown |
State Management | React Context API & Hooks |
This is the backend authentication system for the EndAI Code Generator app. It handles user registration, email OTP verification, secure login/logout, and token-based authentication using JWT. Built with Node.js, Express, and MongoDB, it ensures a smooth and secure authentication flow for developers.
- π User Registration with email and password
- π§ OTP Verification via email before account activation
- π Secure Login using JWT
- πͺ Logout with token/session invalidation
- π§ Password Hashing with bcrypt
- π‘οΈ Protected Routes using auth middleware
- π Email Sending using Nodemailer
- β±οΈ OTP Expiry Handling
Technology | Description |
---|---|
Node.js + Express | Web server and routing |
MongoDB + Mongoose | Database and data modeling |
bcryptjs | Password hashing |
jsonwebtoken | JWT-based token auth |
dotenv | Manage environment variables |
Nodemailer | Email delivery for OTP |
- Endpoint:
POST /api/auth/register
- Payload:
{ "email": "[email protected]", "password": "yourpassword" }
Endpoint: POST /api/auth/verify-otp
Endpoint: POST /api/auth/login
Endpoint: POST /api/auth/logout (optional)
Process:
Clears HTTP-only cookie (if using cookies)
Or removes token client-side
Create a .env file in the root and add:
.env
PORT=4000
MONGO_URI = your_mongodb_connection_string
JWT_SECRET = your_jwt_secret_key
EMAIL_USER = [email protected]
EMAIL_PASS = your_email_password_or_app_password
endai-auth-backend/
βββ controllers/
β βββ authController.js # Handles register, verify, login, logout
βββ models/
β βββ User.js # Mongoose user schema
βββ routes/
β βββ authRoutes.js # Express routes for auth
βββ middleware/
β βββ authMiddleware.js # JWT token verification
βββ utils/
β βββ sendOTP.js # Nodemailer utility
βββ .env # Environment variables
βββ server.js # App entry point
βββ package.json # Project metadata
- Clone the Repo
git clone https://github.com/201Harsh/End-AI-CG.git
cd Backend
npm install
Fill in the required values for MongoDB, JWT, and email.
npx nodemon or node server.js
Server runs on http://localhost:4000
-
Hash passwords with bcrypt (already implemented)
-
JWT tokens expire after 1h (customizable)
-
OTP expires after 5β10 minutes (can be extended)
-
Optional: Add rate limiting for OTP requests
-
Uses Nodemailer
-
Compatible with Gmail (use an App Password)
-
Can be swapped out for Mailgun, SendGrid, etc.
-
β Add "Resend OTP" with cooldown
-
π Add password reset via email
-
π Add user analytics and dashboard
-
π Host on Render/Heroku/Vercel backend
- Click the
+
button or "Create New Project". - Type a prompt describing the type of project/code you want.
- Hit βGenerateβ.
- The AI processes the request and generates:
- A syntax-highlighted code block.
- A markdown description.
- Both are displayed with a typing animation.
- Each generated project is listed in a collapsible sidebar.
- Click any saved project to quickly reload it (typing effect skipped for saved items).
- Buttons are provided to copy the code and markdown description to your clipboard instantly.
- β‘ Skip boilerplate and get straight to building.
- π Perfect for learning and exploring new coding patterns.
- π¨ Clean and minimal UI focused on productivity.
- π Save and revisit your generated projects anytime.
Follow these steps to set up the project locally:
git clone https://github.com/201Harsh/End-AI-CG.git
cd Frontend
npm install
Create a .env file in the root directory and add your Google Gemini API key:
VITE_GEMINI_API_KEY=your_google_gemini_api_key
Don't have one? You can get a free API key from the Google AI Studio.
npm run dev
- The app will be running at http://localhost:5173 (or whatever port Vite assigns).
npm run build
No screen shot Available
-
React β Core UI framework
-
Tailwind CSS β Utility-first styling
-
Framer Motion β Smooth animations
-
Prism.js β Code syntax highlighting
-
React Markdown β Description rendering
-
Google Gemini API β AI generation engine
- Variable Description VITE_GEMINI_API_KEY Your Google Gemini API key
Contributions are welcome! Whether it's improving the UI, fixing bugs, or adding new features:
-
Fork the repository.
-
Create a new branch (git checkout -b feature-name).
-
Commit your changes (git commit -m 'add feature').
-
Push to the branch (git push origin feature-name).
-
Open a pull request.
This project is licensed under the MIT License.Β© 2025 Harsh
- π Live Preview on
- https://endaicodegen.onrender.com/
Made with β€οΈ by Harsh