A full-stack application built with MongoDB, Express.js, React, and Node.js for exploring tech career paths, roadmaps, and company information.
- Authentication: JWT-based user registration and login
- DSA Practice Sheets: Dynamic problem sets with progress tracking
- 25+ curated problems across 5 categories
- Mark problems as completed
- Filter by difficulty and category
- Password-protected admin interface to add new problems
- Career Paths: Explore different tech career options
- Roadmaps: Detailed learning paths for various technologies
- Companies: Information about tech companies and their requirements
- Dashboard: Personalized user dashboard with progress tracking
- Responsive Design: Works on desktop and mobile devices
- React 18 with TypeScript
- Vite for build tooling
- Tailwind CSS for styling
- Lucide React for icons
- Node.js with Express.js
- MongoDB with Mongoose
- JWT for authentication
- bcryptjs for password hashing
Before running this application, make sure you have:
- Node.js (version 18 or higher)
- MongoDB (running locally or MongoDB Atlas)
- npm or yarn
# Install frontend dependencies
npm install
# Install backend dependencies
cd server
npm install
cd ..mongodUpdate the MONGO_URI in server/.env to your Atlas connection string.
To run the application, follow these steps in order:
-
Seed the Database (populate with sample data):
cd server && node seed-dsa.js && cd ..
-
Start the Backend Server:
cd server && npm run dev
-
Start the Frontend Server (in a new terminal):
npm run dev
# Start both servers automatically (after seeding)
./start-mern.bat- Frontend: http://localhost:5173
- Backend API: http://localhost:5000
βββ public/ # Static files
βββ src/ # Frontend source code
β βββ components/ # React components
β β βββ auth/ # Authentication components
β β βββ layout/ # Layout components
β β βββ ui/ # UI components
β βββ context/ # React context providers
β βββ data/ # Static data files (deprecated)
β βββ pages/ # Page components
β β βββ DSASheetsPage.tsx # DSA problems interface
β βββ services/ # API services
β βββ apiService.ts # API service with DSA methods
βββ server/ # Backend source code
β βββ models/ # MongoDB models
β β βββ DSAProblem.js # DSA problem model
β βββ routes/ # Express routes
β β βββ auth.js # Authentication routes
β β βββ dsa.js # DSA problem routes
β β βββ progress.js # User progress routes
β βββ seed-dsa.js # Database seeding script
β βββ .env # Environment variables
β βββ index.js # Server entry point
βββ README.md
Create a server/.env file with:
MONGO_URI=mongodb://localhost:27017/techcareer
JWT_SECRET=your-super-secret-jwt-key
PORT=5000- Check Server Status: Run
./check-mern-status.bat - Seed DSA Problems: Run
cd server && node seed-dsa.jsto populate the database with sample problems - Register: Create a new account at http://localhost:5173/signup
- Login: Sign in with your credentials
- Explore: Navigate through career paths, roadmaps, and companies
- DSA Practice: Visit the DSA Sheets page to practice problems and track progress
- Add Problems: Use password "virus@123" to access the admin interface for adding new problems
# Install all dependencies (frontend + backend)
npm install
cd server && npm install && cd ..# Option A: Local MongoDB
mongod
# Option B: MongoDB Atlas (update server/.env)
# MONGO_URI=mongodb+srv://your-connection-string# Populate database with sample DSA problems
cd server && node seed-dsa.js && cd ..# Terminal 1 - Backend Server
cd server && npm run dev
# Terminal 2 - Frontend Server
npm run dev# Start both servers automatically
./start-mern.bat# Build frontend for production
npm run build
# Start backend in production mode
cd server && npm start- Frontend: http://localhost:5173
- Backend API: http://localhost:5000
- DSA Sheets: Navigate to DSA Sheets page after login
npm run dev- Start development servernpm run build- Build for productionnpm run preview- Preview production build
npm start- Start production servernpm run dev- Start development server with nodemon
cd server && node seed-dsa.js- Seed database with sample problems
-
MongoDB Connection Error
- Ensure MongoDB is running locally
- Check the
MONGO_URIinserver/.env
-
Port Already in Use
- Frontend (5173): Kill the process using the port
- Backend (5000): Change
PORTinserver/.env
-
Authentication Issues
- Clear browser localStorage
- Check JWT_SECRET in
server/.env
- Backend logs appear in the server terminal
- Frontend logs appear in browser console
- Check network tab for API request/response details
npm run build
# Deploy the 'dist' folder- Set environment variables
- Deploy the 'server' folder
- Ensure MongoDB Atlas is configured
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
This project is licensed under the MIT License.
Happy coding! π