An intelligent, scalable, AI-powered online coding platform designed for competitive programming, learning, and skill assessment.
🌐 Live Project: https://www.codeastra.me
🎥 Demo Video: https://www.loom.com/share/53baea46a13e4fb681098339d70afc4b
- Project Description
- ✨ Key Features
- 🛠️ Tech Stack
- 🚀 Getting Started
- 🤝 How to Contribute
- 🙏 Acknowledgements
- 📄 License
CodeAstra is a modern online judge platform built to provide a seamless and feature-rich experience for programmers. It allows users to write, submit, and test their code against predefined test cases. The platform is enhanced with AI capabilities to provide intelligent feedback, code reviews, and hints, making it a powerful tool for both beginners and experienced coders. The entire application is containerized with Docker and deployed on AWS for scalability and reliability.
- 💻 Code Execution: Run and submit code in multiple languages.
- 🤖 AI-Powered Assistance:
- Get instant code reviews and suggestions for improvement.
- Receive hints when you're stuck on a problem.
- Automatically fix bugs in your code.
- Generate boilerplate code to get started quickly.
- 📊 Submission History: Track and review all your past submissions in one place.
- 🎨 Enhanced Frontend: A sleek, responsive, and user-friendly interface built with Next.js and Shadcn/ui for an optimal user experience.
- 🔐 Admin Panel: A powerful built-in Django admin panel to manage problems, test cases, and users with ease.
- 🐳 Dockerized: Fully containerized backend and frontend for consistent development, testing, and deployment environments.
- ☁️ Cloud Hosted: Deployed on AWS EC2 for high availability and scalability.
- Contest Module: Participate in time-bound coding contests.
- Real-time Leaderboard: See your rank update live during contests with WebSockets.
- Framework: Next.js
- State Management: Redux Toolkit & RTK Query
- UI Components: Shadcn/ui
- Styling: Tailwind CSS
- Framework: Django & Django REST Framework
- Database: PostgreSQL (Recommended) / SQLite3
Follow these instructions to set up the project locally for development and testing.
-
Clone the repository:
git clone https://github.com/your-username/codeastra.git cd codeastra
-
Backend Setup:
# Navigate to the backend directory cd backend # Create and activate a virtual environment python -m venv venv source venv/bin/activate # On Windows, use `venv\Scripts\activate` # Install dependencies pip install -r requirements.txt # Create a .env file from the example cp .env.example .env # (Update the .env file with your database and secret keys) # Run database migrations python manage.py migrate # Start the Django development server python manage.py runserver
The backend will be running at
http://127.0.0.1:8000
. -
Frontend Setup:
# Navigate to the frontend directory from the root cd frontend # Install dependencies npm install # Create a .env.local file from the example cp .env.example .env.local # (Update VITE_API_URL to point to your backend: http://127.0.0.1:8000) # Start the Next.js development server npm run dev
The frontend will be running at
http://localhost:3000
.
For a more streamlined setup, you can use Docker to run the entire application.
-
Ensure Docker is running.
-
From the root of the project directory, build and run the containers:
# build the image of project. docker build -t <image_name> . # run container docker run -d -p8000:8000 <image_name or images_id>
This command will build the images for both the frontend and backend services and start them. The frontend will be accessible at
http://localhost:3000
and the backend athttp://localhost:8000
.
Contributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement".
- Fork the Project
- 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
Don't forget to give the project a star! Thanks again!