Skip to content

agrawal-2005/BDA_LAB

Repository files navigation

BDA_LAB - Big Data Analytics Lab Portal

A web application for managing people, projects, and conferences for the Big Data Analytics Lab, built with Node.js and MySQL, and containerized with Docker.

Table of Contents


Features

  • User Authentication: Role-based login for Admins, Faculty, PhD, MTech, and BTech users.
  • Admin Dashboard: View site-wide statistics and manage content.
  • Content Management: Add and view projects, conferences, and co-authors.
  • User Profiles: Dedicated profile pages for logged-in users to view their associated work.
  • Database GUI: Includes phpMyAdmin for easy, web-based database management.

Tech Stack

  • Backend: Node.js, Express.js
  • Frontend: EJS (Embedded JavaScript templates), HTML, CSS
  • Database: MySQL
  • Authentication: express-session, bcryptjs for password hashing
  • Containerization: Docker, Docker Compose

Getting Started

Follow these instructions to get a copy of the project up and running on your local machine.

Prerequisites

Make sure you have the following software installed:

Installation

  1. Clone the repository:

    git clone [https://github.com/your-username/BDA_LAB.git](https://github.com/your-username/BDA_LAB.git)
  2. Navigate to the project directory:

    cd BDA_LAB
  3. Prepare the Database Script: Place your SQL database schema file in the root of the project and name it init.sql. This script will be automatically executed by Docker to set up the database the first time you start the application.

  4. Configure Environment Variables: Open the docker-compose.yml file and review the environment section for both the app and db services. Adjust passwords and secrets as needed.


Usage

  1. Build and Start the Application: Run the following command from the root of the project. This will build the Docker images and start all services (the Node.js app, MySQL database, and phpMyAdmin).

    docker-compose up --build

    To run the containers in the background, add the -d flag: docker-compose up -d --build.

  2. Accessing the Application:

    • Web Application: http://localhost:3000
    • phpMyAdmin (Database GUI): http://localhost:8080
    • Database Connection (for external tools):
      • Host: 127.0.0.1
      • Port: 3307 (or the host port you specified in docker-compose.yml)
      • User: root
      • Password: The password set in docker-compose.yml
  3. Stopping the Application: To stop all running containers, press Ctrl + C in the terminal where they are running, or run:

    docker-compose down

Environment Variables

Configuration is managed in the docker-compose.yml file.

App Service (app)

  • SESSION_SECRET – A secret key used to sign session ID cookies.
  • DB_HOST – The hostname of the database service (should be db).
  • DB_USER – The username for the database connection.
  • DB_PASSWORD – The password for the database connection.
  • DB_DATABASE – The name of the database to use.

Database Service (db)

  • MYSQL_ROOT_PASSWORD – The root password for the MySQL server.
  • MYSQL_DATABASE – The name of the database to create automatically on startup.

🔒 Keep your secrets in docker-compose.yml secure and consider using Docker Secrets for production environments.


ScreenShot

BDA Lab Homepage BDA Lab LoginPage BDA Lab FeebackPage


Contributing

Contributions are welcome! Follow these steps:

  1. Fork the repo.
  2. Create a new branch (git checkout -b feature-branch).
  3. Make your changes and commit them (git commit -m "Add feature").
  4. Push to your branch (git push origin feature-branch).
  5. Open a Pull Request.

License

This project is licensed under the MIT License.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •