Skip to content

Latest commit

 

History

History
52 lines (44 loc) · 1.53 KB

File metadata and controls

52 lines (44 loc) · 1.53 KB

FlowChain AI - Setup Instructions

Prerequisites

  • Node.js (v18+)
  • MongoDB (Running on localhost:27017)

Quick Start

1. Backend Setup

Open a terminal:

cd backend
npm install
npm run seed  # (Optional: Resets DB with default users)
node server.js

The server will start on port 5000.

Default Login Credentials:

  • Admin: admin@flowchain.ai / admin123
  • Ops Manager: ops@flowchain.ai / ops123
  • Customer: customer@gmail.com / customer123

2. Frontend Setup

Open a new terminal:

cd frontend
npm install
npm run dev

Open the link provided (usually http://localhost:5173) to view the app.

Project Structure

  • /backend: Node.js + Express + Mongoose API.
    • models/: Database schemas (Strictly typed).
    • controllers/: Logic for Auth and others.
    • routes/: API endpoints.
  • /frontend: React + Vite + TailwindCSS.
    • src/components/layout: Sidebar and Main Layout.
    • src/pages: Role-based dashboards (Admin, Ops, etc).
    • src/context: Authentication State Management.
    • src/services: Axios setup with JWT interceptors.

Features Implemented (v1 Scaffolding)

  • Role-Based Authentication: Secure login with JWT.
  • Enterprise UI: Dark mode, glassmorphism, responsive dashboard.
  • Database Schema: Complete MongoDB schema for Supply Chain entities.
  • Admin Dashboard: Visual analytics using Recharts.

Developer Notes

  • Add specific business logic in backend/controllers.
  • Expand frontend pages in frontend/src/pages/ using the provided components.