Skip to content

Scaler-Innovation-Labs/SST_Internal-Tools

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

8 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🏫 SST Internal Tools – Unified Campus Platform

A monorepo project that consolidates key internal tools for Scaler School of Technology into a single platform, including:

  • 🏠 Hostel Management
  • 🍽️ Mess Management
  • πŸ’» E-Learning Hub

This project uses a scalable Monorepo structure with Turborepo, a clean MVC architecture for the backend, and React + Vite for the frontend.


πŸ“ Folder Structure

βœ… Monorepo Folder Architecture for SST_Internal-Tools

SST_Internal-Tools/
β”œβ”€β”€ apps/                             # All runnable apps go here
β”‚   β”œβ”€β”€ backend/                      # Node.js + Express backend (MVC)
β”‚   β”‚   β”œβ”€β”€ controllers/              # Handle request logic (e.g., userController.js)
β”‚   β”‚   β”œβ”€β”€ models/                   # DB models/schema definitions
β”‚   β”‚   β”œβ”€β”€ routes/                   # Express routes (e.g., userRoutes.js)
β”‚   β”‚   β”œβ”€β”€ services/                 # Business logic (used by controllers)
β”‚   β”‚   β”œβ”€β”€ middlewares/              # Reusable middleware (e.g., authMiddleware.js)
β”‚   β”‚   β”œβ”€β”€ config/                   # DB connection, environment setup
β”‚   β”‚   β”œβ”€β”€ utils/                    # Helper utilities (e.g., token, logger)
β”‚   β”‚   β”œβ”€β”€ app.js                    # Express app setup
β”‚   β”‚   └── server.js                 # Entry point to start the server
β”‚   β”‚
β”‚   └── web/                          # React frontend (Vite)
β”‚       β”œβ”€β”€ public/                   # Static files (favicon, etc.)
β”‚       β”œβ”€β”€ src/
β”‚       β”‚   β”œβ”€β”€ components/           # Reusable UI components (e.g., Button, Card)
β”‚       β”‚   β”œβ”€β”€ pages/                # Page-level views (Home.jsx, Dashboard.jsx)
β”‚       β”‚   β”œβ”€β”€ routes/               # React Router config
β”‚       β”‚   β”œβ”€β”€ services/             # API services (e.g., axios instances)
β”‚       β”‚   β”œβ”€β”€ utils/                # Frontend utilities (formatters, validators)
β”‚       β”‚   β”œβ”€β”€ App.jsx               # Main App entry
β”‚       β”‚   └── main.jsx              # React DOM renderer
β”‚       β”œβ”€β”€ index.html
β”‚       └── vite.config.js
β”‚
β”œβ”€β”€ packages/                         # Shared code across apps
β”‚   β”œβ”€β”€ ui/                           # (Optional) Shared design system (Button, Modal, etc.)
β”‚   β”œβ”€β”€ auth/                         # (Optional) Auth-related logic (JWT handling, roles)
β”‚   β”œβ”€β”€ config/                       # (Optional) Shared config like tailwind, eslint, etc.
β”‚   └── utils/                        # (Optional) Shared utilities (validators, date utils, etc.)
β”‚
β”œβ”€β”€ .env.example                      # Example environment file for setup
β”œβ”€β”€ .gitignore                        # Ignore node_modules, .env, etc.
β”œβ”€β”€ package.json                      # Root-level scripts and workspace definition
β”œβ”€β”€ turbo.json                        # Turborepo pipeline config
└── README.md                         # Project overview and usage

πŸ’‘ Folder Breakdown

🧠 apps/backend (MVC)

  • controllers/ β†’ Handle HTTP requests and call services
  • models/ β†’ Define your data structure (with Mongoose, Sequelize, Prisma, etc.)
  • routes/ β†’ API endpoints (e.g., /auth, /students, /hostel)
  • services/ β†’ Business logic, often reusable by multiple controllers
  • middlewares/ β†’ e.g., authentication, error handling, validation
  • config/ β†’ Database setup, third-party configs
  • utils/ β†’ Custom logger, token handler, etc.
  • app.js β†’ Sets up Express app and middleware
  • server.js β†’ Boots up the server

πŸ’» apps/web (React + Vite)

  • components/ β†’ Reusable UI blocks like <Button />, <Navbar />
  • pages/ β†’ Route-linked views like Dashboard, LeaveForm
  • routes/ β†’ React Router setup with layout wrappers
  • services/ β†’ Axios instance, API call logic
  • utils/ β†’ Any helper functions
  • main.jsx / App.jsx β†’ App setup with router and layout

πŸ“¦ packages/ (Optional but scalable)

  • ui/ β†’ Shared design components (used in web + admin panels)
  • auth/ β†’ Shared auth utilities (JWT decode, protected routes, role guards)
  • config/ β†’ Tailwind config, tsconfig, eslint settings

βœ… Turborepo-Specific Notes

package.json (root)

{
  "private": true,
  "workspaces": ["apps/*", "packages/*"],
  "scripts": {
    "dev": "turbo run dev --parallel",
    "build": "turbo run build",
    "lint": "turbo run lint"
  },
  "devDependencies": {
    "turbo": "^1.12.0"
  }
}

turbo.json

{
  "$schema": "https://turborepo.org/schema.json",
  "pipeline": {
    "dev": {
      "cache": false,
      "persistent": true
    },
    "build": {
      "outputs": ["dist/**"]
    },
    "lint": {}
  }
}

πŸš€ Getting Started

1. Clone the Repository

git clone https://github.com/Scaler-Innovation-Labs/SST_Internal-Tools.git
cd SST_Internal-Tools

2. Install Root Dependencies

npm install

This installs dependencies across all apps using Turborepo workspaces.

3. Environment Setup

Create a .env file at the root or per app as needed.

cp .env.example .env

Fill in your variables (e.g., DB connection, JWT secret, Firebase keys, etc.)

PORT=8000
DATABASE_URL=postgres://...
JWT_SECRET=your_jwt

πŸ“¦ Running the Apps

npm run dev

This will run both the frontend and backend in parallel using Turborepo.

πŸ”§ Scripts

npm run dev       # Run all apps in dev mode
npm run build     # Build all apps
npm run lint      # Lint all apps

πŸ§ͺ Future Add-ons

  • Auth system (OAuth + JWT + RBAC)
  • Shared UI package (packages/ui)
  • Central notification service
  • Database ORM setup (Prisma or Mongoose)
  • CI/CD with GitHub Actions

🀝 Contributing

  1. Fork the repo
  2. Create your feature branch: git checkout -b feature/my-feature
  3. Commit your changes: git commit -m "Add some feature"
  4. Push to the branch: git push origin feature/my-feature
  5. Open a pull request

πŸ“„ License

MIT Β© Scaler Innovation Labs

🧠 Innovation Lab Collaboration

Feature details will be brainstormed collaboratively by students in the Innovation Lab. More details to follow soon!

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

3 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors