Skip to content

Aswin-Hariram/GenCode-AI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

98 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸš€ GenCode AI - Full Stack Development Platform

Screenshot 2025-06-19 at 12 16 23β€―AM Screenshot 2025-06-19 at 12 16 16β€―AM Screenshot 2025-06-19 at 12 17 46β€―AM
Next.js React Python Firebase Docker

πŸ“‹ Table of Contents

🌟 Overview

GenCode AI is a full-stack development platform that provides an interactive coding environment with AI-powered assistance. The platform offers real-time code execution, problem-solving assistance, and learning resources for developers of all skill levels.

✨ Features

  • Interactive Code Editor with syntax highlighting
  • AI-Powered Code Assistance
  • Real-time Code Execution
  • DSA Problem Generator
  • User Authentication & Progress Tracking
  • Responsive Design for all devices

πŸ›  Tech Stack

Frontend

  • Framework: Next.js 13 (App Router)
  • UI Library: React 18
  • Styling: Tailwind CSS
  • State Management: React Context API
  • Form Handling: React Hook Form
  • Code Editor: Monaco Editor

Backend

  • Framework: Python (Flask)
  • Authentication: Firebase Authentication
  • Database: Firebase Realtime Database
  • API: RESTful API
  • Code Execution: Docker-based sandbox

πŸš€ Getting Started

Prerequisites

  • Node.js 18+ (for Frontend)
  • Python 3.9+ (for Backend)
  • Docker & Docker Compose
  • Firebase Project with Authentication and Realtime Database

Installation

  1. Clone the repository

    git clone https://github.com/yourusername/GenCode-AI-Frontend.git
    cd GenCode-AI-Frontend
  2. Set up Frontend

    cd Frontend
    npm install
  3. Set up Backend

    cd ../Backend
    python -m venv venv
    source venv/bin/activate  # On Windows: .\venv\Scripts\activate
    pip install -r requirements.txt

Environment Variables

Frontend (.env.local in Frontend directory)

NEXT_PUBLIC_API_URL=http://localhost:5000
NEXT_PUBLIC_FIREBASE_API_KEY=your_firebase_api_key
NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN=your_project_id.firebaseapp.com
NEXT_PUBLIC_FIREBASE_PROJECT_ID=your_project_id
NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET=your_project_id.appspot.com
NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID=your_messaging_sender_id
NEXT_PUBLIC_FIREBASE_APP_ID=your_app_id

Backend (.env in Backend directory)

FLASK_APP=app.py
FLASK_ENV=development
FIREBASE_CREDENTIALS=serviceAccountKey.json
OPENAI_API_KEY=your_openai_api_key

πŸ–₯ Frontend Documentation

The frontend is built with Next.js 13 using the App Router for better performance and developer experience.

Key Features

  • File-based Routing with Next.js App Router
  • Server Components for better performance
  • Code Splitting for optimized loading
  • Responsive Design with Tailwind CSS

Project Structure

Frontend/
β”œβ”€β”€ app/                  # App Router pages
β”œβ”€β”€ components/           # Reusable components
β”œβ”€β”€ contexts/             # React contexts
β”œβ”€β”€ hooks/               # Custom React hooks
β”œβ”€β”€ lib/                 # Utility functions
β”œβ”€β”€ public/              # Static assets
β”œβ”€β”€ styles/              # Global styles
└── types/               # TypeScript type definitions

Running the Frontend

cd Frontend
npm run dev

πŸ”§ Backend Documentation

The backend is built with Python Flask and provides a RESTful API for the frontend.

Key Features

  • RESTful API endpoints
  • Firebase Integration for authentication and database
  • Docker-based code execution environment
  • Logging for debugging and monitoring

Project Structure

Backend/
β”œβ”€β”€ app.py               # Main Flask application
β”œβ”€β”€ codeCompiler.py      # Code execution logic
β”œβ”€β”€ firebase_service.py  # Firebase integration
β”œβ”€β”€ question_generator.py # Problem generation logic
β”œβ”€β”€ submitCode.py        # Code submission handler
β”œβ”€β”€ topic_manager.py     # DSA topic management
└── templates/           # Email templates

Running the Backend

cd Backend
python app.py

πŸš€ Deployment

The application can be deployed using Docker Compose:

docker-compose up --build

Or deploy to a cloud provider of your choice (e.g., Vercel for Frontend, Google Cloud Run for Backend).

πŸ“š API Documentation

Authentication

  • POST /api/auth/register - Register a new user
  • POST /api/auth/login - Login user
  • POST /api/auth/logout - Logout user

Code Execution

  • POST /api/execute - Execute code
  • POST /api/submit - Submit code for evaluation

Problems

  • GET /api/problems - Get list of problems
  • GET /api/problems/:id - Get problem details
  • POST /api/problems - Create new problem (admin only)

🀝 Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

Please read CONTRIBUTING.md for details on our code of conduct and the process for submitting pull requests.

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

✨ Contributors


Made with ❀️ by the GenCode AI Team

About

Resources

Stars

0 stars

Watchers

1 watching

Forks

Packages

 
 
 

Contributors