Skip to content

Jk2006k/GoalNow

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

25 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

GoalNow - Interview Preparation Platform

A modern interview preparation platform with Google OAuth authentication, MongoDB storage, and interactive assessment modules.

πŸš€ Quick Start

Prerequisites

  • Node.js (v16+)
  • MongoDB (local or Atlas)
  • Google OAuth Credentials

Installation

  1. Clone/Setup the project

    cd GoalNow
  2. Configure Google OAuth

    • Follow SETUP_GUIDE.md for Google Cloud setup
    • Get your Google Client ID
  3. Setup Server

    cd server
    npm install
    # Create .env file with your credentials
    npm run dev
  4. Setup Client

    cd client
    npm install
    # Create .env.local with your Google Client ID
    npm run dev
  5. Access the app

πŸ“‹ Features

Authentication

  • βœ… Google OAuth Sign-In - Direct login with Google
  • βœ… Email Sign-Up - Manual registration with name & email
  • βœ… Profile Management - Custom avatar and profile updates
  • βœ… JWT Authentication - Secure token-based auth
  • βœ… MongoDB Storage - All user data persisted

Assessment Modules

  • πŸ“ Behavioral Assessment - Interview behavior questions
  • πŸ’» Technical Assessment - Coding and technical questions
  • πŸ“Š Performance Tracking - Track progress over time

User Features

  • πŸ‘€ User Profiles - Custom profile with avatar
  • πŸ” Secure Authentication - JWT tokens
  • πŸ“± Responsive Design - Works on all devices

πŸ—οΈ Project Structure

GoalNow/
β”œβ”€β”€ client/                 # React frontend
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ Page/          # Page components
β”‚   β”‚   β”œβ”€β”€ components/    # Reusable components
β”‚   β”‚   β”œβ”€β”€ assesment/     # Assessment modules
β”‚   β”‚   └── services/      # API services
β”‚   β”œβ”€β”€ .env.local         # Client environment
β”‚   └── package.json
β”œβ”€β”€ server/                # Express backend
β”‚   β”œβ”€β”€ models/            # MongoDB schemas
β”‚   β”œβ”€β”€ routes/            # API routes
β”‚   β”œβ”€β”€ server.js          # Entry point
β”‚   β”œβ”€β”€ .env               # Server environment
β”‚   └── package.json
└── SETUP_GUIDE.md         # Detailed setup guide

πŸ”‘ Environment Variables

Server (.env)

MONGODB_URI=mongodb://localhost:27017/goalnow
GOOGLE_CLIENT_ID=your_google_client_id
GOOGLE_CLIENT_SECRET=your_google_client_secret
JWT_SECRET=your_jwt_secret_key
PORT=5000

Client (.env.local)

VITE_GOOGLE_CLIENT_ID=your_google_client_id
VITE_API_URL=http://localhost:5000/api

πŸ“š API Documentation

Authentication Endpoints

Google Sign-Up

POST /api/auth/google-signup
Body: { googleId, firstName, lastName, email, googleProfileImage }
Response: { token, user }

Email Sign-Up

POST /api/auth/email-signup
Body: { firstName, lastName, email, profileImage }
Response: { token, user }

Get Profile

GET /api/auth/profile/:userId
Response: { user }

Update Profile

PUT /api/auth/profile/:userId
Body: { firstName, lastName, profileImage }
Response: { user }

πŸ› οΈ Tech Stack

Frontend

  • React 19
  • React Router DOM
  • Axios
  • React OAuth (Google)
  • Tailwind CSS
  • Three.js (3D elements)

Backend

  • Node.js / Express
  • MongoDB
  • Mongoose
  • JSON Web Tokens (JWT)
  • CORS

πŸ” Security Features

  • βœ… JWT-based authentication
  • βœ… Password hashing (ready to implement)
  • βœ… CORS protection
  • βœ… Environment variable protection
  • βœ… MongoDB injection prevention

πŸ“ Data Storage

All user information is stored in MongoDB with the following schema:

{
  firstName: String,
  lastName: String,
  email: String (unique),
  googleId: String (unique, sparse),
  profileImage: String,
  googleProfileImage: String,
  signupMethod: String ('google' | 'email'),
  verified: Boolean,
  createdAt: Date,
  updatedAt: Date
}

πŸš€ Deployment

Heroku/Railway

  1. Update your env variables
  2. Ensure MongoDB Atlas connection string
  3. Update CORS origins
  4. Deploy both client and server

Vercel/Netlify (Client)

  1. Deploy from GitHub
  2. Set env variables
  3. Update API URL

πŸ“– Documentation

πŸ› Troubleshooting

Google Sign-In Not Working

  • Verify Client ID in .env.local
  • Check origins in Google Cloud Console
  • Clear browser cache

MongoDB Connection Error

  • Verify connection string in .env
  • Check MongoDB is running
  • For Atlas: verify credentials and IP whitelist

CORS Errors

  • Ensure client and server URLs match
  • Check CORS configuration in server

πŸ“§ Support

For issues or questions, refer to SETUP_GUIDE.md or contact support.

πŸ“„ License

ISC

πŸ‘₯ Contributors

Created for interview preparation practice.


Last Updated: March 2026

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages