Skip to content

SATYAM-PRATIBHAN/CodeQuest

Repository files navigation

CodeQuest - Your Ultimate Coding Hub

CodeQuest is a comprehensive platform that aggregates the best coding interview questions from popular platforms like LeetCode, Codeforces, HackerRank, and more. It provides an intuitive coding environment, real-time discussions, and progress tracking to help developers excel in coding interviews.

Features 🚀

  • Aggregated Coding Problems from various platforms.
  • Integrated Code Editor for solving problems directly on the platform.
  • Real-time Discussions powered by WebSockets for interactive learning.
  • Progress Tracking to help users monitor their preparation journey.
  • Advanced Filtering & Search for seamless navigation.
  • Authentication using NextAuth with Google and Credential Providers.

Tech Stack 🛠️

Frontend

  • Next.js with TypeScript
  • TailwindCSS for styling

Backend

  • Node.js with API routes

Database

  • PostgreSQL with Prisma ORM

Deployment & DevOps

  • Vercel for deployment
  • Prometheus, Grafana, and Loki for monitoring and scaling

State Management

  • Zustand

Getting Started 🏗️

1. Clone the Repository

git clone https://github.com/SATYAM-PRATIBHAN/CodeQuest.git
cd codequest

2. Install Dependencies

yarn install

3. Environment Variables

Create a .env file in the root directory and add the following:

DATABASE_URL=postgresql://USER:PASSWORD@localhost:5432/codequest
NEXTAUTH_URL=http://localhost:3000
NEXTAUTH_SECRET=your-secret-key
GOOGLE_CLIENT_ID=your-google-client-id
GOOGLE_CLIENT_SECRET=your-google-client-secret

Database Setup 🗄️

  1. Install PostgreSQL if not already installed:
sudo apt update && sudo apt install postgresql
  1. Start PostgreSQL Service:
sudo service postgresql start
  1. Access PostgreSQL:
sudo -u postgres psql
  1. Create a new database:
CREATE DATABASE codequest;
  1. Run Prisma Migrations:
npx prisma migrate dev
  1. Generate Prisma Client:
npx prisma generate

NextAuth Configuration 🔐

  1. Add Google OAuth credentials in the .env file.
  2. In your auth/[...nextauth].ts file:
import NextAuth from "next-auth";
import GoogleProvider from "next-auth/providers/google";
import CredentialsProvider from "next-auth/providers/credentials";

export const authOptions = {
  providers: [
    GoogleProvider({
      clientId: process.env.GOOGLE_CLIENT_ID!,
      clientSecret: process.env.GOOGLE_CLIENT_SECRET!,
    }),
    CredentialsProvider({
      name: "Credentials",
      credentials: {
        email: { label: "Email", type: "text" },
        password: { label: "Password", type: "password" }
      },
      async authorize(credentials) {
        const user = { id: "1", name: "Admin", email: credentials?.email };
        return user || null;
      }
    })
  ],
};

export default NextAuth(authOptions);

Running the Application ▶️

  1. Start the development server:
yarn dev
  1. Open http://localhost:3000 in your browser.

Contributing 🤝

We welcome contributions to improve CodeQuest! Feel free to submit issues, pull requests, or new feature suggestions.


License 📜

This project is licensed under the MIT License.

About

CodeQuest: Master Coding Interviews with Curated Problems and Real-Time Collaboration.

Topics

Resources

License

Stars

Watchers

Forks

Languages