- Overview
- Features
- Tech Stack
- Getting Started
- Frontend Documentation
- Backend Documentation
- Deployment
- API Documentation
- Contributing
- License
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.
- 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
- 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
- Framework: Python (Flask)
- Authentication: Firebase Authentication
- Database: Firebase Realtime Database
- API: RESTful API
- Code Execution: Docker-based sandbox
- Node.js 18+ (for Frontend)
- Python 3.9+ (for Backend)
- Docker & Docker Compose
- Firebase Project with Authentication and Realtime Database
-
Clone the repository
git clone https://github.com/yourusername/GenCode-AI-Frontend.git cd GenCode-AI-Frontend -
Set up Frontend
cd Frontend npm install -
Set up Backend
cd ../Backend python -m venv venv source venv/bin/activate # On Windows: .\venv\Scripts\activate pip install -r requirements.txt
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_idFLASK_APP=app.py
FLASK_ENV=development
FIREBASE_CREDENTIALS=serviceAccountKey.json
OPENAI_API_KEY=your_openai_api_keyThe frontend is built with Next.js 13 using the App Router for better performance and developer experience.
- File-based Routing with Next.js App Router
- Server Components for better performance
- Code Splitting for optimized loading
- Responsive Design with Tailwind CSS
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
cd Frontend
npm run devThe backend is built with Python Flask and provides a RESTful API for the frontend.
- RESTful API endpoints
- Firebase Integration for authentication and database
- Docker-based code execution environment
- Logging for debugging and monitoring
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
cd Backend
python app.pyThe application can be deployed using Docker Compose:
docker-compose up --buildOr deploy to a cloud provider of your choice (e.g., Vercel for Frontend, Google Cloud Run for Backend).
POST /api/auth/register- Register a new userPOST /api/auth/login- Login userPOST /api/auth/logout- Logout user
POST /api/execute- Execute codePOST /api/submit- Submit code for evaluation
GET /api/problems- Get list of problemsGET /api/problems/:id- Get problem detailsPOST /api/problems- Create new problem (admin only)
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
Please read CONTRIBUTING.md for details on our code of conduct and the process for submitting pull requests.
This project is licensed under the MIT License - see the LICENSE file for details.