This project is a full-stack Employee Database Management System built with the PERN stack (PostgreSQL, Express, React, Node.js). This first phase implements core features including user authentication and a read-only view of the employee list for admin users.
- Node.js (v18.x)
- PostgreSQL
This project requires Node.js 18.x. If you're using a different version, you may encounter OpenSSL compatibility errors.
a. Create the Database:
CREATE DATABASE edms_db;b. Seed the Database: Run the following command to create the tables and populate them with sample data.
psql -U <your_postgres_username> -d edms_db -f backend/seed.sqla. Navigate to the backend directory:
cd backendb. Create Environment File:
Copy the .env.example file to a new .env file and update the DATABASE_URL with your PostgreSQL credentials.
cp .env.example .envYour .env file should look like this:
DATABASE_URL=postgresql://<your_postgres_username>:<your_password>@localhost:5432/edms_db
PORT=5000
c. Install Dependencies and Run:
npm install
npm run devThe backend server will start on http://localhost:5000.
a. Navigate to the frontend directory in a new terminal:
cd frontendb. Install Dependencies and Run:
npm install
npm startThe frontend development server will open automatically in your browser at http://localhost:3000.
Once the application is running, you can log in with the following admin credentials:
- Email:
admin@edms.com - Password:
admin123