Skip to content

Navigation Menu

Sign in
Sign up

Latest commit

History

11 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

Project Logo

Codex Environment

Codex Environment is a comprehensive Data Structures and Algorithms (DSA) learning platform designed to provide an interactive and immersive educational experience. It features algorithm visualizations, an AI-powered practice arena with Socratic hints, and a multi-language code execution engine.

πŸš€ Features

  • Algorithm Visualizer: Interactive step-by-step visualizations for Sorting, Searching, Stacks, Queues, Linked Lists, Trees, Graphs, and more.
  • AI Practice Arena: Solve coding problems with real-time feedback.
    • Socratic Hints: AI-powered hints that guide you towards the solution without giving it away.
    • Code Review: Instant AI code reviews analyzing correctness, complexity (Time/Space), and style.
  • Code Execution Engine: Run code securely in JavaScript, Python, Java, and C++.
  • Interactive Tutorials: Learn concepts like Big O notation and Recursion through interactive modules.
  • Modern UI: Polished Glassmorphism design system using Tailwind CSS and Framer Motion.

πŸ› οΈ Tech Stack

Frontend

  • Framework: React (Vite)
  • State Management: Redux Toolkit
  • Styling: Tailwind CSS
  • Code Editor: Monaco Editor (@monaco-editor/react)
  • Animations: Framer Motion
  • Icons: Lucide React
  • Charts: Recharts

Backend

  • Server: Node.js & Express
  • AI Integration: Google Generative AI
  • Security: Helmet, CORS, Rate Limiting
  • Execution: Child Processes for multi-language code execution

πŸ“‹ Prerequisites

  • Node.js (v18+ recommended)
  • npm or yarn
  • Google Gemini API Key (for AI features)

πŸ“¦ Installation & Setup

1. Clone the Repository

git clone <repository-url>
cd Codex Environment

2. Backend Setup

The backend runs the API server and code execution engine.

  1. Navigate to the server directory:

    cd backend/server
  2. Install dependencies:

    npm install
  3. Create a .env file in backend/server/ with the following variables:

    PORT=3000
    GEMINI_API_KEY=your_gemini_api_key_here
    FRONTEND_URL=http://localhost:5173

    (Note: Replace your_gemini_api_key_here with your actual key from Google AI Studio)

  4. Start the server:

    npm run dev

    The server will start at http://localhost:3000.

3. Frontend Setup

The frontend provides the user interface.

  1. Open a new terminal and navigate to the frontend directory:
    cd frontend
  2. Install dependencies:
    npm install
  3. Start the development server:
    npm run dev
    The application will be available at http://localhost:5173.

πŸ“‚ Project Structure

Codex Environment/
β”œβ”€β”€ frontend/ # React + Vite application
β”‚ β”œβ”€β”€ src/ # Source code (Components, Store, Pages)
β”‚ β”œβ”€β”€ public/ # Static assets
β”‚ └── package.json # Frontend dependencies
β”œβ”€β”€ backend/ # Backend services
β”‚ β”œβ”€β”€ server/ # Express API server
β”‚ β”‚ β”œβ”€β”€ data/ # JSON data files (Algorithms, Questions)
β”‚ β”‚ β”œβ”€β”€ index.js # Server entry point
β”‚ β”‚ └── package.json # Backend dependencies
β”‚ └── scripts/ # Utility scripts
└── README.md # Project documentation

πŸ”’ Security Note

The code execution engine runs user-submitted code on the server. While basic timeouts and cleanup are implemented, this is intended for a controlled educational environment.

🀝 Contributing

Contributions are welcome! Please open an issue or submit a pull request for any improvements or bug fixes.

About

Codex Environment: An interactive Data Structures & Algorithms learning platform featuring πŸš€ real-time visualizations, an πŸ€– AI-powered Socratic teaching assistant, and a ⚑ multi-language (JavaScript, Python, Java, and C++) code execution engine.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

AltStyle γ«γ‚ˆγ£γ¦ε€‰ζ›γ•γ‚ŒγŸγƒšγƒΌγ‚Έ (->γ‚ͺγƒͺγ‚ΈγƒŠγƒ«) /