Skip to content

zestacademy/Compilers

Repository files navigation

This is a Next.js project bootstrapped with create-next-app.

🔧 Configuration Required

This project includes multiple online compilers and features that require API credentials to function:

1. JDoodle API (for C and Java Compilers)

  1. Visit JDoodle Compiler API
  2. Sign up for a free account
  3. Get your Client ID and Client Secret
  4. Free tier includes: 200 credits/day (sufficient for testing)

2. Google Gemini API (for Python Compiler's Explain Feature)

  1. Visit Google AI Studio
  2. Sign in with your Google account
  3. Click "Create API Key"
  4. Copy your API key

3. Firebase (for User Authentication and Database)

  1. Visit Firebase Console
  2. Create a new project or select an existing one
  3. Go to Project Settings > General
  4. Scroll down to "Your apps" section
  5. Click on the web app icon (</>) or create a new web app
  6. Copy all the configuration values (apiKey, authDomain, projectId, etc.)

4. Setup Environment Variables

  1. Copy .env.example to .env.local:

    cp .env.example .env.local
  2. Edit .env.local and add your credentials:

    # JDoodle API
    JDOODLE_CLIENT_ID=your_actual_client_id
    JDOODLE_CLIENT_SECRET=your_actual_client_secret
    
    # Google Gemini API
    GEMINI_API_KEY=your_actual_gemini_api_key
    
    # Firebase Configuration
    NEXT_PUBLIC_FIREBASE_API_KEY=your_actual_firebase_api_key
    NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN=your-project-id.firebaseapp.com
    NEXT_PUBLIC_FIREBASE_PROJECT_ID=your_actual_project_id
    NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET=your-project-id.appspot.com
    NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID=your_actual_sender_id
    NEXT_PUBLIC_FIREBASE_APP_ID=your_actual_app_id
    NEXT_PUBLIC_FIREBASE_MEASUREMENT_ID=your_actual_measurement_id
  3. Restart your development server

Note:

  • The Python compiler will work without API keys (uses Pyodide in browser), but the "Explain" feature requires Gemini API.
  • The C and Java compilers require JDoodle API to function.
  • Firebase is required for user authentication and data persistence.
  • All API calls are made server-side for security (credentials are never exposed to the browser).

Getting Started

First, run the development server:

npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev

Open http://localhost:3000 with your browser to see the result.

You can start editing the page by modifying app/page.tsx. The page auto-updates as you edit the file.

This project uses next/font to automatically optimize and load Geist, a new font family for Vercel.

Learn More

To learn more about Next.js, take a look at the following resources:

You can check out the Next.js GitHub repository - your feedback and contributions are welcome!

Deploy on Vercel

The easiest way to deploy your Next.js app is to use the Vercel Platform from the creators of Next.js.

Check out our Next.js deployment documentation for more details.

About

Resources

Stars

Watchers

Forks

Contributors 2

  •  
  •  

Languages