NurseSathi connects nursing students with hospitals for internships and entry-level nursing jobs across India.
- Node.js 18+
- npm 9+
- A Neon PostgreSQL database
- A Google Cloud OAuth 2.0 app (for Google login)
# Backend
cd backend
npm install
# Frontend
cd ../frontend
npm installcd backend
cp .env.example .envEdit backend/.env and fill in:
DATABASE_URL=postgresql://user:pass@ep-xxx.region.aws.neon.tech/neondb?sslmode=require
JWT_SECRET=your_long_random_secret
GOOGLE_CLIENT_ID=your_client_id.apps.googleusercontent.com
GOOGLE_CLIENT_SECRET=your_client_secret
PORT=3000
FRONTEND_URL=http://localhost:5173- Go to Google Cloud Console
- Create a project → APIs & Services → Credentials → Create OAuth 2.0 Client
- Application type: Web application
- Authorized redirect URIs:
http://localhost:3000/auth/google/callback - Copy Client ID and Secret into
.env
- Sign up at neon.tech
- Create a new project
- Copy the connection string into
DATABASE_URL - Tables are auto-created on server start — no manual migrations needed!
Open two terminals:
# Terminal 1 — Backend
cd backend
npm run dev
# → Running on http://localhost:3000
# Terminal 2 — Frontend
cd frontend
npm run dev
# → Running on http://localhost:5173Open http://localhost:5173 in your browser.
NurseSathi/
├── backend/
│ ├── config/
│ │ ├── db.js # Neon DB connection + table init
│ │ └── passport.js # Google OAuth strategy
│ ├── controllers/
│ │ ├── authController.js
│ │ ├── jobController.js
│ │ └── applicationController.js
│ ├── middleware/
│ │ └── auth.js # JWT + role guard middleware
│ ├── routes/
│ │ ├── authRoutes.js
│ │ ├── jobRoutes.js
│ │ └── applicationRoutes.js
│ ├── services/
│ │ ├── userService.js
│ │ ├── jobService.js
│ │ └── applicationService.js
│ ├── utils/
│ │ └── jwt.js
│ ├── server.js
│ ├── .env.example
│ └── package.json
│
└── frontend/
├── src/
│ ├── components/
│ │ ├── Navbar.jsx
│ │ ├── JobCard.jsx
│ │ └── ProtectedRoute.jsx
│ ├── context/
│ │ └── AuthContext.jsx
│ ├── pages/
│ │ ├── Home.jsx
│ │ ├── Login.jsx
│ │ ├── Register.jsx
│ │ ├── Jobs.jsx
│ │ ├── JobDetail.jsx
│ │ ├── StudentDashboard.jsx
│ │ ├── HospitalDashboard.jsx
│ │ ├── Profile.jsx
│ │ └── GoogleAuthSuccess.jsx
│ ├── routes/
│ │ └── AppRoutes.jsx
│ ├── services/
│ │ ├── api.js
│ │ ├── authService.js
│ │ ├── jobService.js
│ │ └── applicationService.js
│ ├── App.jsx
│ ├── main.jsx
│ └── index.css
└── package.json
| Method | Endpoint | Auth | Description |
|---|---|---|---|
| POST | /auth/register |
— | Register with email/password |
| POST | /auth/login |
— | Login with email/password |
| GET | /auth/google |
— | Google OAuth redirect |
| GET | /auth/google/callback |
— | Google OAuth callback |
| GET | /auth/me |
JWT | Get current user |
| PATCH | /auth/profile |
JWT | Update profile |
| GET | /jobs |
— | List all jobs (with filters) |
| GET | /jobs/:id |
— | Get single job |
| POST | /jobs |
Hospital | Post a job |
| GET | /jobs/mine |
Hospital | Get hospital's jobs |
| DELETE | /jobs/:id |
Hospital | Delete a job |
| POST | /jobs/:id/apply |
Student | Apply to a job |
| GET | /jobs/:id/applications |
Hospital | Get applicants for a job |
| GET | /applications |
Hospital | All applicants across jobs |
| GET | /applications/mine |
Student | Student's own applications |
| PATCH | /applications/:id/status |
Hospital | Update application status |
users — id, role, name, email, password, phone, education, skills, hospital_name, location, google_id, avatar
jobs — id, title, description, location, salary, type, requirements, posted_by (→users.id)
applications — id, job_id, student_id, status, cover_letter (UNIQUE: job_id+student_id)- Passwords hashed with bcryptjs (12 rounds)
- JWT tokens expire in 7 days
- Role-based middleware protects hospital/student routes
- UNIQUE constraint prevents duplicate applications (DB-level)
- CORS restricted to
FRONTEND_URL
- Register with email or Google
- Browse & filter nursing jobs
- Apply with cover letter
- Track application statuses (Applied → Reviewed → Accepted/Rejected)
- Edit profile (education, skills, location)
- Register and set up profile
- Post, manage, and delete job listings
- View all applicants with their profiles
- Accept / Review / Reject applicants
| Layer | Technology |
|---|---|
| Backend | Node.js, Express.js |
| Database | PostgreSQL (Neon Serverless) |
| Auth | JWT, bcryptjs, Passport.js (Google OAuth) |
| Frontend | React 19 (Vite) |
| HTTP Client | Axios |
| Routing | React Router v6 |
| State | Context API |
| Styling | Vanilla CSS (custom design system) |