Development Setup Guide (Post-Deployment Compatible)
This project is an open-source resource management system designed to help organizations efficiently host, allocate, and monitor their CPU and GPU infrastructure. It enables institutions to bring their compute resources online, manage user access, and maintain full visibility over usageβwithout relying on expensive proprietary software.
The system is particularly suited for educational institutions, research labs, and R&D organizations that require a cost-effective, flexible, and scalable solution to manage shared compute environments.
The platform implements a structured, role-based access model to ensure proper governance, security, and efficient workflow management:
-
Admin
- Full control over the system and configurations
- Manage users, machines, and permissions
- Monitor system-wide activity
-
Teachers / Supervisors
- Review and validate student requests
- Approve or reject access based on academic or research needs
-
Students / Users
- Request access to CPU/GPU resources
- Track request status and usage
A transparent and structured lifecycle for resource requests:
-
Students submit requests specifying:
- Required resources (CPU/GPU)
- Duration of usage
- Purpose of request
-
Teachers:
- Review requests for relevance and necessity
- Approve or reject accordingly
-
Approved requests proceed for allocation
This workflow ensures responsible and efficient utilization of shared resources.
Centralized management of all compute resources:
- Add new CPU/GPU machines with detailed specifications
- Remove or decommission outdated or faulty machines
- Maintain a live and updated inventory of all resources
- Support onboarding of any number of machines
Comprehensive control and visibility for administrators:
- Monitor real-time machine usage and utilization
- Track active users and their allocations
- Modify or revoke user access when required
- Ensure optimal and fair distribution of resources
Enable data-driven decisions with detailed analytics:
- Generate reports on CPU/GPU usage
- Analyze trends in resource demand
- Share reports with faculty or management
- Support infrastructure planning and scaling
Improve efficiency and avoid resource conflicts:
- Check real-time availability of machines before requesting access
- Prevent overbooking and contention
- Help users plan workloads effectively
Designed to grow with your needs:
- Supports unlimited machine integration
- Suitable for small labs to large institutional clusters
- Easily adaptable to increasing workloads and users
Compute machines connect via Jupyter HTTP links to the Node.js server, which manages auth, resources, and notifications. MongoDB handles persistence across two databases, and clients communicate via HTTP(S) API.
- Prerequisites
- 1. Fork & Clone
- 2. Install Dependencies
- 3. Environment Variables
- 4. Jupyter Server
- 5. Create Admin
- 6. Create Test Users
- 7. Run the Project
- Verification Checklist
- Important Notes
Ensure the following are installed before proceeding:
| Tool | Version | Purpose |
|---|---|---|
| Node.js | v16 or higher | Runtime environment |
| npm | Bundled with Node | Package manager |
| MongoDB | Local instance | Primary database |
| Python | 3.x | Jupyter Notebook backend |
| Git | Latest stable | Version control |
Go to the original repository on GitHub and click Fork to copy it to your account.
git clone <your-forked-repo-url>
cd <project-folder>npm installThis project uses a .env file for all sensitive configuration.
cp sample.env .envThen open .env and fill in each section below.
MONGO_URI=mongodb://localhost:27017/college_resources
STATS_DB_URI=mongodb://localhost:27017/machine_monitoringGenerate your keys first:
npx web-push generate-vapid-keysThen paste the output into .env:
VAPID_PUBLIC_KEY=your_public_key
VAPID_PRIVATE_KEY=your_private_keySMTP_HOST=smtp.gmail.com
SMTP_PORT=587
SMTP_USER=your_email@gmail.com
SMTP_PASS=your_app_passwordπ‘ Use a Gmail App Password β not your regular Gmail password.
JUPYTER_SERVER_URL=your_jupyter_server_url
β οΈ Only update the required values above. Leave all other variables unchanged.
pip install jupyterlabpython -m jupyter notebook \
--ip=0.0.0.0 \
--port=8888 \
--NotebookApp.base_url='/notebook' \
--NotebookApp.token='your-token' \
--NotebookApp.password='' \
--NotebookApp.allow_origin='*' \
--no-browsepython -m jupyter notebook --ip=0.0.0.0 --port=8888 --NotebookApp.base_url='/notebook' --NotebookApp.token='your-token' --NotebookApp.password='' --NotebookApp.allow_origin='*' --no-browseOnce the server is running, open your browser and navigate to:
http://localhost:8888
When prompted for a token, paste the following:
382ac7ebf58c8fc0ac8d5a26c534e61bbe49681cb359b7e9bcb36b346e18f336
π‘ The token is pre-configured in the start command above. You only need to paste it once β the session stays authenticated until the server is restarted.
cd server/main/utils
node createAdmin.jsThis creates an admin user in the database.
Manually create the following accounts for testing system functionality:
- Teacher β for testing teacher-facing features
- Student β for testing student-facing features
β οΈ Ensure MongoDB is running before this step.
npm run devUse this checklist to confirm everything is working after setup:
- MongoDB connected and running
- Dev server started without errors
- Admin user created successfully
- Teacher & Student test accounts working
- SMTP configured and sending emails
- OTP generating correctly
- VAPID / Web Push keys active
- Jupyter server connected and responding
π« Do NOT commit your .env file to version control
π Keep all credentials and API keys private
π Always ensure MongoDB is running before starting the server
This project is initialized by following these steps in order:
- Fork & clone the repository
- Run
npm install - Copy
sample.envβ.envand fill in all required values - Generate VAPID keys and add to
.env - Configure SMTP (Gmail App Password)
- Start the Jupyter server
- Run
node createAdmin.jsto create admin - Create dummy Teacher & Student users
- Verify OTP system is functional
- Run
npm run devand check the verification list above
π― Project is fully set up and ready for development.
Crafted with β€οΈ in Chandigarh, India
Telecommunication Research Laboratory Β· Menthosa Solutions Pvt. Ltd.
