A web application designed to replace the traditional physical student record book.
- Student Portal: Secure login, profile management, MOOC certificate uploads, academic/extracurricular tracking.
- Teacher Dashboard: View student profiles, evaluate certificates, provide feedback.
- Admin Capabilities: Manage users and system settings.
- Frontend:
- React.js
- Material-UI (@mui/material)
- React Router (
react-router-dom) - Axios (for API requests)
- Firebase (for Authentication/Storage)
- Backend:
- Node.js
- Express.js
- PostgreSQL (
pg) - JWT (
jsonwebtokenfor Authentication) - bcrypt (for Password Hashing)
- CORS, Body Parser (Middleware)
Before you begin, ensure you have the following installed:
- Node.js (v14 or later)
- npm (v6 or later)
- PostgreSQL (v12 or later)
- Git
Clone the Repository
git clone https://github.com/sajalkmr/strbook.git cd strbookEnvironment Configuration Create a
.envfile in the root directory with your specific credentials (see example below).Install Dependencies
# Install frontend dependencies (in root directory) npm install # Install backend dependenciescd backend npm install cd .. # Return to root directory
Database Setup Ensure your PostgreSQL server is running.
# Connect to PostgreSQL (replace 'postgres' if using a different user) psql -U postgres # Create the database CREATE DATABASE str_book;\q# Run migrations (from backend directory)cd backend node migrations/run-migrations.js cd .. # Return to root directory
Start Development Servers
# Start backend and frontend concurrently from the root directory npm run devAccess the Application
- Frontend: http://localhost:3000
- Backend API: http://localhost:5000
Example .env file (root directory):
# Frontend Environment VariablesREACT_APP_API_URL=http://localhost:5000REACT_APP_FIREBASE_API_KEY=your_firebase_api_keyREACT_APP_FIREBASE_AUTH_DOMAIN=your_firebase_auth_domain# ... add other Firebase config variables as needed (projectId, storageBucket, etc.)# Backend Environment VariablesPORT=5000DB_USER=your_db_user# e.g., postgresDB_PASSWORD=your_db_passwordDB_HOST=localhostDB_PORT=5432DB_NAME=str_bookJWT_SECRET=your_very_secret_and_strong_jwt_keyNote: Remember to replace placeholder values in .env with your actual configuration.