{"id":25601131,"url":"https://github.com/yeasin2002/express-ts-starter","last_synced_at":"2026-04-07T13:30:56.271Z","repository":{"id":222718251,"uuid":"757958533","full_name":"yeasin2002/express-ts-starter","owner":"yeasin2002","description":"Perfect boilerplate templates for TypeScript and Express with Docker, build tool configured and scaffolded with all necessary packages.","archived":false,"fork":false,"pushed_at":"2025-11-10T01:13:14.000Z","size":573,"stargazers_count":59,"open_issues_count":1,"forks_count":12,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-11-11T13:31:48.117Z","etag":null,"topics":["boilterplate","express","express-boilerplate","express-starter","express-template","nodejs","rest-api","template","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yeasin2002.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2024-02-15T10:42:22.000Z","updated_at":"2025-09-23T03:37:01.000Z","dependencies_parsed_at":"2024-09-05T15:39:19.838Z","dependency_job_id":"d602bf69-e8cd-472b-8685-71a7bff4d5ea","html_url":"https://github.com/yeasin2002/express-ts-starter","commit_stats":null,"previous_names":["yeasin-2002/express-ts-starter","yeasin2002/express-ts-starter"],"tags_count":0,"template":true,"template_full_name":null,"purl":"pkg:github/yeasin2002/express-ts-starter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yeasin2002%2Fexpress-ts-starter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yeasin2002%2Fexpress-ts-starter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yeasin2002%2Fexpress-ts-starter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yeasin2002%2Fexpress-ts-starter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yeasin2002","download_url":"https://codeload.github.com/yeasin2002/express-ts-starter/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yeasin2002%2Fexpress-ts-starter/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31515144,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-07T03:10:19.677Z","status":"ssl_error","status_checked_at":"2026-04-07T03:10:13.982Z","response_time":105,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["boilterplate","express","express-boilerplate","express-starter","express-template","nodejs","rest-api","template","typescript"],"created_at":"2025-02-21T15:52:43.690Z","updated_at":"2026-04-07T13:30:56.265Z","avatar_url":"https://github.com/yeasin2002.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# JobSphere Backend\n\nBackend API for JobSphere - a mobile marketplace connecting customers with local freelance contractors (electricians, plumbers, cleaners, carpenters, etc.).\n\n## Tech Stack\n\n- **Runtime**: Node.js with TypeScript\n- **Framework**: Express.js v5.1.0\n- **Database**: MongoDB with Mongoose ODM\n- **Package Manager**: Bun\n- **Authentication**: JWT with refresh token rotation\n- **Real-Time**: Socket.IO for WebSocket chat\n- **Payments**: Stripe with escrow system\n- **Notifications**: Firebase Cloud Messaging (FCM)\n- **File Upload**: Local storage (future AWS S3 migration)\n\n## Key Features\n\n- JWT authentication with access/refresh tokens\n- Role-based access (Customer, Contractor, Admin)\n- Real-time chat between users\n- Push notifications for mobile app with Firebase\n- Stripe payment processing with escrow\n- File upload system\n- OTP-based password recovery\n\n## Getting Started\n\n### Prerequisites\n\n- Node.js 18+\n- Bun package manager\n- MongoDB instance\n- Stripe account (for payments)\n- Firebase project (for notifications)\n\n### Installation\n\n```bash\nbun install\n```\n\n### Environment Setup\n\nCreate a `.env` file in the root directory:\n\n```env\n# Server\nPORT=4000\nNODE_ENV=development\n\n# Database\nMONGODB_URI=mongodb://localhost:27017/jobsphere\n\n# JWT\nJWT_ACCESS_SECRET=your_access_secret\nJWT_REFRESH_SECRET=your_refresh_secret\nJWT_ACCESS_EXPIRY=15m\nJWT_REFRESH_EXPIRY=7d\n\n# Email (for OTP)\nSMTP_HOST=smtp.gmail.com\nSMTP_PORT=587\nSMTP_USER=your_email@gmail.com\nSMTP_PASS=your_app_password\n\n# WebSocket\nSOCKET_PORT=3001\n\n# File Upload\nUPLOAD_DIR=./upload\nMAX_FILE_SIZE=10485760\n\n# Stripe\nSTRIPE_SECRET_KEY=sk_test_...\nSTRIPE_PUBLISHABLE_KEY=pk_test_...\nSTRIPE_WEBHOOK_SECRET=whsec_...\nSTRIPE_COMMISSION_PERCENT=10\n\n# Firebase (FCM)\nFCM_SERVER_KEY=...\nFCM_PROJECT_ID=...\n```\n\n### Development\n\n```bash\nbun dev          # Start with hot reload\nbun dev:b        # Start with Bun hot reload\n```\n\n### Production\n\n```bash\nbun build        # Build the project\nbun start        # Start production server\n```\n\n### Code Quality\n\n```bash\nbun check        # Run oxlint\nbun check-types  # TypeScript type checking\n```\n\n### Module Generator\n\nQuickly scaffold new API modules with boilerplate code:\n\n```bash\nbun run generate:module\n```\n\nThis will prompt for a module name and create:\n- `[module].route.ts` - Express router with CRUD endpoints\n- `[module].service.ts` - Business logic handlers\n- `[module].schema.ts` - Zod validation schemas with OpenAPI docs\n\nSee `script/README.md` for detailed usage.\n\n## Project Structure\n\n```\njobsphere-backend/\n├── src/\n│   ├── db/              # Database connection and models\n│   ├── routers/         # API route handlers\n│   │   ├── auth.ts      # Authentication routes\n│   │   ├── user.ts      # User management\n│   │   ├── job.ts       # Job postings\n│   │   ├── payment.ts   # Payment processing\n│   │   └── chat.ts      # Chat endpoints\n│   ├── middleware/      # Auth, validation, error handling\n│   ├── services/        # Business logic\n│   ├── utils/           # Helper functions\n│   └── index.ts         # Application entry point\n├── upload/              # File upload directory\n└── .kiro/steering/      # Project documentation\n```\n\n## User Roles\n\n- **Customer**: Posts jobs, hires contractors, makes payments\n- **Contractor**: Offers services, accepts jobs, receives payments\n- **Admin**: Monitors platform, manages disputes, oversees transactions\n\n## API Endpoints\n\n### Authentication\n\n- `POST /api/auth/register` - User registration\n- `POST /api/auth/login` - User login\n- `POST /api/auth/forgot-password` - Request OTP\n- `POST /api/auth/reset-password` - Reset with OTP\n- `POST /api/auth/refresh` - Refresh access token\n- `POST /api/auth/logout` - Logout user\n\n### Payments\n\n- `POST /api/payments/create-intent` - Create payment\n- `POST /api/payments/confirm` - Confirm payment\n- `POST /api/payouts/withdraw` - Contractor withdrawal\n- `POST /api/webhooks/stripe` - Stripe webhooks\n\n### File Upload\n\n- `POST /api/upload` - Upload file\n- `GET /api/files/:filename` - Get file\n\n## Payment Flow\n\n1. Customer posts job with budget\n2. Contractor accepts job\n3. Customer pays via Stripe (held in escrow)\n4. Job completed → Payment auto-released to contractor\n5. Contractor withdraws to bank account\n\n## Contributing\n\nThis project uses Husky for pre-commit hooks to ensure code quality. All commits are automatically linted and type-checked.\n\n## License\n\nPrivate - All rights reserved\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyeasin2002%2Fexpress-ts-starter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyeasin2002%2Fexpress-ts-starter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyeasin2002%2Fexpress-ts-starter/lists"}