{"id":29867153,"url":"https://github.com/hyperafnan/videotube","last_synced_at":"2026-05-07T08:35:18.890Z","repository":{"id":291455581,"uuid":"977667101","full_name":"HyperAfnan/videotube","owner":"HyperAfnan","description":"backend i build while following chai aur code's backend playlist and beyond the project","archived":false,"fork":false,"pushed_at":"2025-10-03T04:04:41.000Z","size":5439,"stargazers_count":5,"open_issues_count":7,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-03T06:10:59.127Z","etag":null,"topics":["backend","express-backend","mongodb","mongoose","nodejs-backend"],"latest_commit_sha":null,"homepage":"https://chai-code-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/HyperAfnan.png","metadata":{"files":{"readme":null,"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":"2025-05-04T18:05:29.000Z","updated_at":"2025-10-03T04:04:44.000Z","dependencies_parsed_at":"2025-05-04T19:27:56.466Z","dependency_job_id":"4408e5f5-f007-4a4c-b5e4-edb8aeac49d2","html_url":"https://github.com/HyperAfnan/videotube","commit_stats":null,"previous_names":["hyperafnan/chai-code-backend","hyperafnan/videotube"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/HyperAfnan/videotube","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HyperAfnan%2Fvideotube","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HyperAfnan%2Fvideotube/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HyperAfnan%2Fvideotube/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HyperAfnan%2Fvideotube/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/HyperAfnan","download_url":"https://codeload.github.com/HyperAfnan/videotube/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HyperAfnan%2Fvideotube/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278670795,"owners_count":26025736,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-06T02:00:05.630Z","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":["backend","express-backend","mongodb","mongoose","nodejs-backend"],"created_at":"2025-07-30T13:22:04.781Z","updated_at":"2025-10-06T19:42:26.412Z","avatar_url":"https://github.com/HyperAfnan.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# chai-code-backend\n\nA backend project built while following the \"Chai aur Code\" backend playlist, focusing on modern JavaScript practices, modular architecture, and clear code organization.\n\n---\n\n## Table of Contents\n\n- [Project Overview](#project-overview)\n- [Features](#features)\n- [Tech Stack](#tech-stack)\n- [Repository Structure](#repository-structure)\n- [Architecture](#architecture)\n- [Environment Variables](#environment-variables)\n- [Setup \u0026 Installation](#setup--installation)\n- [Running the Application](#running-the-application)\n- [Troubleshooting](#troubleshooting)\n- [License](#license)\n\n---\n\n## Project Overview\n\n**chai-code-backend** is a learning-oriented backend server project based on the Chai aur Code playlist. It leverages Node.js and modern JavaScript to provide a clear, scalable foundation for backend services, emphasizing best practices in structure and maintainability.\n\n---\n\n## Features\n\n- Express.js server setup\n- Modular file and folder organization\n- Environment-based configuration\n- Middleware support (custom and third-party)\n- Utilities for common tasks\n- Database integration (likely via `/src/db`)\n- Ready-to-extend component structure\n\n---\n\n## Tech Stack\n\n- **Language:** JavaScript (Node.js)\n- **Framework:** Express.js (inferred from structure)\n- **Database:** (Configured via `/src/db`; exact DB can be specified in `.env`)\n- **Linting:** ESLint\n- **Formatting:** Prettier\n\n---\n\n## Repository Structure\n\n```\nchai-code-backend/\n│\n├── .gitignore\n├── .prettierignore\n├── .prettierrc\n├── eslint.config.js\n├── package.json\n├── Readme.md\n│\n├── public/                # Static assets (if used)\n│\n└── src/\n    ├── app.js             # Main Express application setup\n    ├── index.js           # Application entry point\n    ├── components/        # Modular components (routes, controllers, etc.)\n    ├── db/                # Database connection/configuration\n    ├── middlewares/       # Express middlewares (auth, error handling, etc.)\n    └── utils/             # Utility/helper functions\n```\n\n---\n\n## Architecture\n\n**Layered and Modular Architecture:**\n\n- **Entry Point:**\n\n  - `src/index.js` starts the server and runs the main application.\n  - `src/app.js` sets up the Express app, middleware, and routes.\n\n- **Components:**\n\n  - `src/components/` is intended for modular features (controllers, routes, business logic).\n\n- **Database:**\n\n  - `src/db/` handles database configuration and connection logic.\n\n- **Middlewares:**\n\n  - `src/middlewares/` contains Express middleware functions (e.g., authentication, error handling, logging).\n\n- **Utils:**\n\n  - `src/utils/` provides helper functions and utilities for use throughout the project.\n\n- **Static Files:**\n\n  - `public/` can serve static assets if needed.\n\n- **Configuration:**\n  - Linting and formatting are enforced with ESLint and Prettier configs.\n  - Environment variables should be defined in a `.env` file (see below).\n\n---\n\n## Environment Variables\n\nDefine all sensitive and environment-specific variables in a `.env` file at the root.\n\n**Example:**\n\n```\nPORT=5000\n\nMONGODB_URI=your mongodb uri\nACCESS_TOKEN_SECRET=\"your access token secret\"\nACCESS_TOKEN_EXPIRY=1d\nREFRESH_TOKEN_SECRET=\"your refresh token secret\"\nREFRESH_TOKEN_EXPIRY=10d\nCONFIRMATION_TOKEN_SECRET=\"your confirmation token secret\"\nCONFIRMATION_TOKEN_EXPIRY=2h\nFORGET_PASSWORD_TOKEN_SECRET=\"your forget password token secret\"\nFORGET_PASSWORD_TOKEN_EXPIRY=2h\n\nCLOUDINARY_CLOUD_NAME=your cloudinary cloud name\nCLOUDINARY_API_SECRET=your cloudinary api secret\nCLOUDINARY_API_KEY=your cloudinary api key\n\nNODE_ENV=development\n\nREDIS_HOST=your redis host\nREDIS_USERNAME=your redis username\nREDIS_PASSWORD=your redis password\nREDIS_PORT=your redis port\n\nBREVO_SERVER_URL=smtp-relay.brevo.com\nEMAIL_USER=your email user\nBREVO_PORT=587\nBREVO_USERNAME=your brevo username\nBREVO_PASSWORD=your brevo password\n```\n\n\u003e Add any other variables as required by your database or third-party services.\n\n---\n\n## Setup \u0026 Installation\n\n1. **Clone the repository**\n\n   ```sh\n   git clone https://github.com/HyperAfnan/chai-code-backend.git\n   cd chai-code-backend\n   ```\n\n2. **Install dependencies**\n\n   ```sh\n   npm install\n   ```\n\n3. **Lint and format code (optional)**\n   ```sh\n   npm run lint\n   ```\n\n---\n\n## Running the Application\n\n**Development mode:**\n\n```sh\nnpm run dev\n```\n\n**Production mode:**\n\n```sh\nnpm start\n```\n\n---\n\n## Scripts\n\n- `npm run dev` — Start server in development mode (with hot reload if configured)\n- `npm start` — Start server in production mode\n- `npm run lint` — Lint codebase using ESLint\n\n---\n\n## Troubleshooting\n\n- **Database Errors:** Confirm your database service is running and `.env` variables are set correctly.\n- **Port Conflicts:** Edit the `PORT` variable in your `.env` file.\n- **Linting/Prettier:** Run `npm run lint` to check for formatting/linting issues.\n\n---\n\n## License\n\nThis project is licensed under the [MIT License](./LICENSE).\n\n---\n\n**Happy Coding! 🚀**\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhyperafnan%2Fvideotube","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhyperafnan%2Fvideotube","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhyperafnan%2Fvideotube/lists"}