https://github.com/ahmad-masud/compcode
⌨ Prepare for your company's coding interview through solving frequently asked LeetCode problems.
https://github.com/ahmad-masud/compcode
express faang leetcode mongodb nodejs react stripe
Last synced: 16 days ago
JSON representation
⌨ Prepare for your company's coding interview through solving frequently asked LeetCode problems.
- Host: GitHub
- URL: https://github.com/ahmad-masud/compcode
- Owner: ahmad-masud
- License: other
- Created: 2024-07-10T06:51:55.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-12-03T05:11:15.000Z (4 months ago)
- Last Synced: 2025-12-06T06:38:23.822Z (4 months ago)
- Topics: express, faang, leetcode, mongodb, nodejs, react, stripe
- Language: JavaScript
- Homepage: https://compcode.vercel.app
- Size: 8.35 MB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# CompCode
CompCode is a web application designed to help you prepare for coding interviews by solving commonly asked LeetCode problems from various popular companies. The app provides a user-friendly interface to browse, solve, and track your progress.
---
## Features
- **Company-Specific Problems** – View and solve questions by company.
- **Submission Reports** – Track which problems you've completed.
- **Progress Tracking** – Lessons, quizzes, and coding tasks are auto-tracked.
- **Stripe Payments** – Premium subscription with checkout and customer portal.
- **User Authentication** – Google login powered by Passport.js and JWT.
- **Dark/Light Mode** – Theme adapts to system or manual preference.
- **Responsive Design** – Mobile-first and fully responsive.
---
## Tech Stack
- **Frontend**: React + Vite + React Router + Tailwind CSS
- **Backend**: Express.js + MongoDB + Mongoose
- **Auth**: Google OAuth 2.0 with Passport.js + JWT
- **Payments**: Stripe Checkout and Webhooks
- **Hosting**:
- Frontend: [Vercel](https://vercel.com/)
- Backend: [Vercel](https://vercel.com/)
---
## Getting Started
### Prerequisites
- Node.js v16+
- MongoDB Atlas (or local MongoDB)
- Stripe Account
- Google Cloud OAuth Client
- Vercel Account
---
### Server Setup
1. **Clone the project and set up server directory**:
```bash
git clone https://github.com/ahmad-masud/CompCode.git
cd CompCode/server
npm install
```
2. **Create a `.env` file**:
```env
MONGO_URI=your_mongodb_connection_string
JWT_SECRET=your_jwt_secret
STRIPE_SECRET=your_stripe_secret_key
STRIPE_WEBHOOK_SIGNING_SECRET=your_stripe_webhook_secret
GOOGLE_CLIENT_ID=your_google_client_id
GOOGLE_CLIENT_SECRET=your_google_client_secret
CLIENT_URL=http://localhost:3000
SERVER_URL=http://localhost:4000
```
3. **Run the server**:
```bash
npm start
```
---
### Client Setup
1. **Navigate to client**:
```bash
cd ../client
npm install
```
2. **Add a `.env` file**:
```env
REACT_APP_SERVER_URL=http://localhost:4000
REACT_APP_STRIPE_PUBLISHABLE_KEY=your_stripe_publishable_key
```
3. **Run the client**:
```bash
npm run dev
```
---
## Deployment Notes
- Deploy the **client** (React) to [Vercel](https://vercel.com/)
- Deploy the **server** (Express) to [Vercel](https://vercel.com/)
- Set up your Stripe Webhook URL to:
```
https://your-backend-host.com/api/payment/webhook
```
---
## License
Distributed under the CC BY-NC-ND 4.0 License. See [LICENSE](LICENSE) for more information.