This is a Node.js-based admin dashboard application using PostgreSQL as the database. It includes features like user authentication, data visualization, and user management.
Follow these steps to set up and run the application locally.
- Node.js installed
- PostgreSQL installed
-
Clone the repository:
git clone https://github.com/yourusername/your-repo.git cd your-repo
-
Install dependencies:
npm install
-
Set up the environment variables: Create a
.env
file in the root directory with the following variables:DB_USER=leopoldweber DB_PASSWORD=my_password DB_HOST=localhost DB_PORT=5432 DB_NAME=my_local_db
-
Initialize the database: The database will auto-initialize on server startup using the
db.sql
file. Alternatively, you can manually run:psql -U leopoldweber -d my_local_db -f db.sql
-
Start the server:
node server.js
-
Access the application: Open your browser and navigate to http://localhost:3001/login.html.
- User Authentication (Login/Register)
- Admin Dashboard
- User Management (List/Search Users)
- Charts for Data Visualization
.
├── public/ # Static files (HTML, CSS, JS)
├── db.sql # Database schema and data
├── server.js # Main server file
├── db.js # Database connection setup
├── .env # Environment variables (not included in repo)
├── package.json # Project dependencies
└── README.md # Project documentation
Feel free to fork this repository and submit pull requests for improvements.
This project is licensed under the MIT License.