Skip to content

FiveStackDev/Resource-Hub

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

12 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Resource Hub

Resource Hub is a full-stack web application for managing meals, assets, maintenance, and organizational resources. It offers distinct functionalities and dashboards for Administrators and Users, powered by a Ballerina backend and a modern React frontend.


πŸ“ Project Structure

/Resource-Hub
β”œβ”€β”€ Front-End/                # React frontend app
└── Back-End/                 # Ballerina backend API

✨ Features

πŸ”’ Authentication & Authorization

  • JWT-based login system
  • Role-based access control (Admin & User)

🍽️ Meal Management

  • Users can request meals via a calendar UI
  • Admins manage meal types and times

πŸ› οΈ Maintenance Management

  • Users submit maintenance requests
  • Admins prioritize and track maintenance tasks

🧰 Asset Management

  • Asset request and tracking by users
  • Admins manage inventory and handovers

πŸ‘€ User Management

  • Admin-side user role control
  • Profile editing and preferences

πŸ“Š Dashboard & Analytics

  • Summary statistics for users and admins

πŸ“§ Email Notifications

  • SMTP-based notifications for events and reminders

πŸ“‘ Reporting

  • API hooks for PDF report generation
  • Admins can generate and download summaries

πŸŒ™ Theme & UI

  • Light/Dark mode toggle
  • Responsive sidebar and layout

πŸ§ͺ Tech Stack

πŸ”§ Backend

  • Language: Ballerina
  • Runtime: Ballerina HTTP module
  • Database: MySQL
  • Email: SMTP
  • Docs: OpenAPI (if enabled)

πŸ’» Frontend

  • Framework: React (TypeScript)
  • UI: Material UI (MUI), Tailwind CSS
  • State Management: React Query, Axios
  • Routing: React Router
  • PDF & Charts: html2pdf.js, Chart.js, Recharts
  • Build Tool: Vite

πŸš€ Getting Started

1. Clone the Repository

git clone https://github.com/FiveStackDev/Resource-Hub.git
cd Resource-Hub

πŸ”§ Backend Setup (/backend)

Install Ballerina:

Download from https://ballerina.io/downloads/

Configure Config.toml

[back_end_ballerina.services]
USER = "your_db_user"
PASSWORD = "your_db_password"
HOST = "localhost"
PORT = "3306"
DATABASE = "your_database_name"
SMTP_HOST = "your_smtp_host"
SMTP_PORT = "587"
SMTP_USER = "your_smtp_user"
SMTP_PASSWORD = "your_smtp_pass"
PDFSHIFT_API_KEY = "your_pdfshift_api_key"

Add MySQL Driver

In Ballerina.toml:

[[platform.java11.dependency]]
groupId = "mysql"
artifactId = "mysql-connector-java"
version = "8.0.26"

Run the Backend

cd backend
bal run

API available at: http://localhost:9090


πŸ–ΌοΈ Frontend Setup (/frontend)

Install Dependencies

cd frontend
npm install

or

yarn install

Run Frontend Dev Server

npm run dev

Open http://localhost:5173


πŸ—οΈ Build for Production

Backend

bal build

Frontend

npm run build

πŸ§ͺ Testing

Backend

bal test

Frontend (Lint)

npm run lint

πŸ—„οΈ Database Schema

A detailed SQL schema is provided in the backend/README.md, including:

  • users, mealtimes, mealtypes, requestedmeals
  • assets, requestedassets, maintenance, notification

πŸ“Œ ER Diagram:

Database Diagram


πŸ“ License

This project is licensed under the MIT License. See LICENSE for details.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published