A web portal for coaching institutes to manage students, batches, branches, admins, and payments.
You need three things installed on your computer. Do these first.
Download and install from: https://git-scm.com/downloads
Verify:
git --versionDownload and install from: https://nodejs.org — choose the LTS version.
Verify:
node --version
npm --versionDownload and install from: https://www.postgresql.org/download
During installation:
- When it asks for a password for the
postgresuser — set one and write it down. You will need it. - Leave the port as
5432.
Verify PostgreSQL is running after installation:
pg_isreadyExpected: localhost:5432 - accepting connections
git clone https://github.com/mahbub-alam-prithibi/sms-pocketcoach.git
cd sms-pocketcoachGo into the backend folder and copy the example environment file:
# Mac / Linux
cp backend/.env.example backend/.env
# Windows (Command Prompt)
copy backend\.env.example backend\.env
# Windows (PowerShell)
Copy-Item backend/.env.example backend/.envOpen backend/.env in any text editor and find this line:
DB_PASSWORD=postgres
Replace postgres with the password you set when you installed PostgreSQL.
Also change the JWT_SECRET to any long random string of your choice:
JWT_SECRET=change-this-to-something-long-and-random
Save the file.
Open your terminal and connect to PostgreSQL:
psql -U postgres -h localhostEnter your PostgreSQL password when prompted.
Once inside, run:
CREATE DATABASE pocket_coach_portal;Then exit:
\qFrom the project root folder, run:
bash setup.shWindows users: If
bashis not available, install Git for Windows — it comes with Git Bash. Open Git Bash and run the command above.
This script will automatically:
- Install all backend dependencies
- Start the backend server (which creates all database tables)
- Create your Super Admin account
- Install all frontend dependencies
When it finishes you will see:
============================================================
Setup complete!
Backend -> http://localhost:3000
Frontend -> http://localhost:5173
Log in with:
Mobile: 01700000000
Password: yourpassword
============================================================
Before running the script, open
setup.shin a text editor and update the Super Admin credentials at the top of the file to your preferred phone number and password:ADMIN_MOBILE="01700000000" ADMIN_PASSWORD="yourpassword"
After setup is done, every time you want to run the project again open two terminal windows:
Terminal 1 — Backend:
cd backend
npm run devYou should see:
🚀 Server running on port 3000
✅ Database connected & synced
Terminal 2 — Frontend:
cd frontend
npm run devYou should see:
➜ Local: http://localhost:5173/
Open your browser and go to http://localhost:5173
Log in with the mobile number and password you set in setup.sh.
If you want to wipe all data and start completely fresh:
psql -U postgres -h localhost -d pocket_coach_portal -c "TRUNCATE TABLE student_payments, \"StudentBatches\", \"BatchBranches\", students, batches, categories, branches, users RESTART IDENTITY CASCADE;"Then create a new Super Admin:
curl -X POST http://localhost:3000/users/superadmin \
-H "Content-Type: application/json" \
-d '{"fullName":"Super Admin","mobile":"01700000000","password":"yourpassword"}'pg_isready says "No such file or directory"
PostgreSQL is not installed or not added to your PATH. Re-install it and make sure to check "Add to PATH" during installation.
psql: error: connection to server failed
PostgreSQL is not running. On Windows, open Services and start "postgresql-x64-xx". On Mac, run brew services start postgresql.
CREATE DATABASE fails with "already exists"
The database was already created. You can skip Step 3.
Backend crashes with "password authentication failed"
The DB_PASSWORD in backend/.env does not match your PostgreSQL password. Open the file and correct it.
curl: Super admin already exists
A Super Admin was already created. Skip the curl command. If you want a different account, reset the data first (see Resetting Everything above).
Port 3000 or 5173 already in use Another process is using that port. Run:
npx kill-port 3000 5173Then start the servers again.