{"id":51085592,"url":"https://github.com/mixro/instiwise_backend","last_synced_at":"2026-06-23T21:32:33.209Z","repository":{"id":183212236,"uuid":"669757132","full_name":"mixro/instiwise_backend","owner":"mixro","description":"The InstiWise Backend is a robust Node.js-based backend designed to support academic management, project sharing, student networking, and institute-wide announcements.","archived":false,"fork":false,"pushed_at":"2025-09-09T08:41:44.000Z","size":86,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-09T10:57:19.911Z","etag":null,"topics":["express","jwt","mongodb","websocket"],"latest_commit_sha":null,"homepage":"https://instiwise-backend.onrender.com","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mixro.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-07-23T10:30:16.000Z","updated_at":"2025-09-09T09:20:56.000Z","dependencies_parsed_at":"2023-10-16T18:21:36.878Z","dependency_job_id":"601530bb-b028-4a4f-9435-0b82e96fd24b","html_url":"https://github.com/mixro/instiwise_backend","commit_stats":null,"previous_names":["mixro/instiwise_backend"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mixro/instiwise_backend","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mixro%2Finstiwise_backend","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mixro%2Finstiwise_backend/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mixro%2Finstiwise_backend/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mixro%2Finstiwise_backend/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mixro","download_url":"https://codeload.github.com/mixro/instiwise_backend/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mixro%2Finstiwise_backend/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34708272,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-23T02:00:07.161Z","response_time":65,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["express","jwt","mongodb","websocket"],"created_at":"2026-06-23T21:32:31.726Z","updated_at":"2026-06-23T21:32:33.203Z","avatar_url":"https://github.com/mixro.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# INSTiWISE Backend - Technical Documentation\n\n![Node.js](https://img.shields.io/badge/Node.js-v18.x-green) \n![Express.js](https://img.shields.io/badge/Express.js-v4.x-blue)\n![MongoDB](https://img.shields.io/badge/MongoDB-Atlas-green)\n![Mongoose](https://img.shields.io/badge/Mongoose-v6.x-orange)\n![JWT](https://img.shields.io/badge/JWT-Security-red)\n\nThe **InstiWise Backend** is a robust Node.js-based backend designed to support academic management, project sharing, student networking, and institute-wide announcements. It provides secure APIs for **user authentication, course and lesson scheduling, project documentation, and centralized communication**.\n\n\n## Table of Contents\n\n- [Overview](#overview)\n- [Project Structure](#project-structure)\n- [Architecture](#architecture)\n- [Technologies](#technologies)\n- [Setup Instructions](#setup-instructions)\n- [API Endpoints](#api-endpoints)\n- [Authentication](#authentication)\n- [Testing](#testing)\n- [Deployment](#deployment)\n- [Error Handling](#error-handling)\n- [Security](#security)\n- [Future Improvements](#future-improvements)\n- [Support](#support)\n\n\n## Overview\n\nThe InstiWise backend powers the **Smart Institute Concept**, enabling:\n- Academic management (courses, lessons, room schedules).\n- Student project sharing and collaboration.\n- News \u0026 announcements from student organizations and administration.\n- Student networking \u0026 connectivity across the institute.\n\nIt uses **Express.js** for routing, **MongoDB** (via Mongoose) for data storage, and **JWT** for authentication.\n\n## Project Structure\n\n```\ninstiwise_backend/\n├── models/\n│   ├── course.model.js       # Course schema\n│   ├── lesson.model.js       # Lesson schema\n│   ├── post.model.js         # News/announcements schema\n│   ├── projects.model.js     # Projects schema\n│   ├── room.model.js         # Rooms schema\n│   └── user.model.js         # User schema\n│\n├── routes/\n│   ├── Auth.js               # Authentication routes\n│   ├── Courses.js            # Course routes\n│   ├── Lessons.js            # Lesson routes\n│   ├── Posts.js              # Posts routes\n│   ├── Projects.js           # Projects routes\n│   ├── Rooms.js              # Rooms routes\n│   ├── User.js               # User routes\n│   └── verifyToken.js        # JWT verification middleware\n│\n├── env                       # Environment config file\n├── controller.js             # Central controller logic\n├── index.js                  # Main entry point\n├── package.json              # Dependencies \u0026 scripts\n└── package-lock.json\n```\n## Architecture\n\n### Components\n- **Express.js Server**: Handles all API requests and routes.\n- **MongoDB + Mongoose**: Database for storing users, courses, lessons, projects, posts, and rooms.\n- **JWT Authentication**: Ensures secure access for users and admins.\n- **CryptoJS**: Encrypts passwords for safe storage.\n- **Middleware**: Protects routes using `verifyToken.js`.\n\n\n## Technologies\n\n- **Node.js**: v18.x  \n- **Express.js**: v4.x  \n- **MongoDB**: Latest (Atlas or local)  \n- **Mongoose**: v6.x for schema modeling  \n- **JWT**: For secure authentication  \n- **CryptoJS**: For password encryption  \n- **Moment.js**: For time/date management  \n\n\n## Setup Instructions\n\n### Prerequisites\n- **Node.js**: v18.x (run `node -v` to verify)\n- **MongoDB**: Atlas account or local installation\n- **Postman**: For testing APIs\n- **Git**: For cloning the repository\n\n### Installation\n1. **Clone Repository**\n   ```bash\n   git clone https://github.com/mixro/instiwise_backend.git\n   cd instiwise_backend\n   ```\n\n2. **Install Dependencies**\n   ```bash\n   npm install\n   ```\n\n3. **Configure Environment**\n   Create `.env` in the root directory:\n   ```env\n   MONGO_URL=your_mongodb_connection_string\n   PASS_SEC=your_crypto_secret\n   JWT_SEC=your_jwt_secret\n   PORT=8800\n   ```\n\n4. **Run the Server**\n   ```bash\n   npm start\n   ```\n   For development with auto-restart:\n   ```bash\n   npm run dev\n   ```\n   Backend runs at:\n   👉 http://localhost:8800/api/\n\n\n\n\n\n## API Endpoints\n\n- **Authentication**\n  - POST /api/auth/register → Register new user\n  - POST /api/auth/login → Login\n  - POST /api/auth/google-login → Google login\n  - POST /api/auth/google-register → Google register\n\n- **Users**\n  - GET /api/users/:id → Get user details\n  - PUT /api/users/:id → Update user profile\n  - DELETE /api/users/:id → Delete user\n\n- **Courses \u0026 Lessons**\n  - POST /api/courses/ → Create new course\n  - POST /api/lessons/ → Create new lesson\n  - GET /api/lessons/ongoing → Get ongoing lessons\n  - GET /api/lessons/upcoming → Get upcoming lessons\n\n- **Rooms**\n  - POST /api/rooms/ → Create room\n  - GET /api/rooms/ → Get all rooms\n  - GET /api/lessons/room/:id → Get lessons in a room\n\n- **Projects**\n  - POST /api/projects/ → Create new project\n  - GET /api/projects/ → Get all projects\n\n- **Posts**\n  - POST /api/posts/ → Create news/announcement\n  - GET /api/posts/ → Get all posts\n\n\n## Authentication\n\n- **JWT**: Required for accessing most routes.\n- **verifyToken.js middleware**: Protects restricted APIs.\n- **Roles**: Admins can create/update/delete lessons, courses, rooms, and posts.\n\n\n## Testing\n\n- Use Postman to test routes.\n- Run backend locally with MongoDB connection.\n- Future improvements include Jest test coverage.\n\n\n## Deployment\n\n- Deploy on Heroku, Render, or AWS EC2.\n- Use MongoDB Atlas for database hosting.\n- Add CI/CD pipelines for continuous deployment.\n\n\n## Error Handling\n\n- Standardized error responses (400, 401, 403, 500).\n- Middleware catches and logs errors.\n\n\n## Security\n\n- Passwords encrypted with CryptoJS.\n- JWT-based authentication.\n- Role-based access for admin routes.\n- MongoDB validation to prevent injections.\n\n\n## Future Improvements\n\n- Notifications for new announcements.\n- Real-time chat for student networking.\n- Analytics dashboard for administrators.\n- Improved project sharing (files, videos).\n\n\n## Support\n\nFor inquiries or support:\\\n📧 Email: josephchongola43@gmail.com\\\n🌐 Website: [INSTiWISE Platform](https://instiwise.netlify.app/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmixro%2Finstiwise_backend","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmixro%2Finstiwise_backend","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmixro%2Finstiwise_backend/lists"}