{"id":31369781,"url":"https://github.com/sakhawat71/tutorlink-psql","last_synced_at":"2026-05-03T10:34:27.534Z","repository":{"id":300714807,"uuid":"1006899588","full_name":"Sakhawat71/tutorlink-psql","owner":"Sakhawat71","description":"Find \u0026 Connect with the Best Tutors","archived":false,"fork":false,"pushed_at":"2026-01-18T09:46:51.000Z","size":74,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-01-18T16:58:01.634Z","etag":null,"topics":["expressjs","nodejs","postgresql","sql","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/Sakhawat71.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":"2025-06-23T06:57:10.000Z","updated_at":"2026-01-18T09:46:54.000Z","dependencies_parsed_at":"2025-06-23T08:23:34.028Z","dependency_job_id":"8ce8a4c2-1181-4170-b2d2-e9815aa5b8d6","html_url":"https://github.com/Sakhawat71/tutorlink-psql","commit_stats":null,"previous_names":["sakhawat71/tutorlink-psql"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Sakhawat71/tutorlink-psql","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sakhawat71%2Ftutorlink-psql","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sakhawat71%2Ftutorlink-psql/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sakhawat71%2Ftutorlink-psql/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sakhawat71%2Ftutorlink-psql/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Sakhawat71","download_url":"https://codeload.github.com/Sakhawat71/tutorlink-psql/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sakhawat71%2Ftutorlink-psql/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32566444,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-03T06:36:36.687Z","status":"ssl_error","status_checked_at":"2026-05-03T06:36:09.306Z","response_time":103,"last_error":"SSL_read: 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":["expressjs","nodejs","postgresql","sql","typescript"],"created_at":"2025-09-27T18:00:34.669Z","updated_at":"2026-05-03T10:34:27.510Z","avatar_url":"https://github.com/Sakhawat71.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# TutorLink Backend\n\nWelcome to the **TutorLink Backend** repository! This is the backend for the TutorLink platform, built using the **PostgreSQL** with **TypeScript**. It provides RESTful APIs for user authentication, tutor-student interactions, course management, bookings, and payments.\n\n## 🚀 Features\n\n- **User Authentication** (JWT-based authentication \u0026 role-based access control)\n- **Tutor \u0026 Student Management**\n- **Course Management** (Create, update, enroll in courses)\n- **Booking System** (Schedule tutor sessions)\n- **Review \u0026 Rating System**\n- **Payment Integration** (SurjoPay)\n- **Admin Dashboard** (Manage users, tutors, and courses)\n- **Fully Typed with TypeScript**\n\n---\n\n## 📂 Folder Structure\n\n```\n📦 tutorlink-backend\n ┣ 📂 src\n ┃ ┣ 📂 app\n ┃ ┃ ┣ 📂 modules\n ┃ ┃ ┃ ┣ 📂 auth\n ┃ ┃ ┃ ┣ 📂 user\n ┃ ┃ ┃ ┣ 📂 tutor\n ┃ ┃ ┃ ┣ 📂 student\n ┃ ┃ ┃ ┣ 📂 course\n ┃ ┃ ┃ ┣ 📂 booking\n ┃ ┃ ┃ ┣ 📂 review\n ┃ ┃ ┃ ┣ 📂 payment\n ┃ ┃ ┃ ┣ 📂 admin\n ┃ ┃ ┃ ┗ 📂 notification\n ┃ ┣ 📂 config\n ┃ ┣ 📂 utils\n ┃ ┣ 📂 middlewares\n ┃ ┣ 📂 errors\n ┃ ┗ 📂 routes\n ┣ 📜 .env\n ┣ 📜 package.json\n ┣ 📜 tsconfig.json\n ┣ 📜 README.md\n ┗ 📜 server.ts\n```\n\n---\n\n## 🛠️ Tech Stack\n\n- **Backend Framework:** Node.js (Express.js)\n- **Database:** PostgreSQL\n- **Authentication:** JWT (JSON Web Token)\n- **ODM:** Prisma\n- **Validation:** Zod\n- **Payment Gateway:** SurjoPay\n- **Language:** TypeScript\n\n---\n\n## 🔧 Installation \u0026 Setup\n\n### 1️⃣ Clone the Repository\n\n```sh\ngit clone https://github.com/sakhawat71/tutorlink-psql.git\ncd tutorlink-backend\n```\n\n### 2️⃣ Install Dependencies\n\n```sh\nnpm install\n```\n\n### 3️⃣ Set Up Environment Variables\n\nCreate a `.env` file in the root directory and add the following:\n\n```env\nPORT=5000\nMONGO_URI=your_mongodb_connection_string\nACCESS_TOKEN_SECRET=your_jwt_secret\nACCESS_TOKEN_EXPIRY=1h\nSURJOPAY_API_KEY=your_surjopay_key\n```\n\n### 4️⃣ Start the Development Server\n\n```sh\nnpm run dev\n```\n\n### 5️⃣ Build for Production\n\n```sh\nnpm run build\n```\n\n---\n\n## 🔗 API Endpoints\n\n### **Authentication**\n\n- `POST /api/v1/auth/register` - Register a new user\n- `POST /api/v1/auth/login` - Login and get a JWT token\n\n### **User**\n\n- `GET /api/v1/users/profile` - Get logged-in user profile\n- `PUT /api/v1/users/update` - Update user details\n\n### **Tutor**\n\n- `GET /api/v1/tutors` - Get all tutors\n- `POST /api/v1/tutors` - Register as a tutor\n\n### **Student**\n\n- `GET /api/v1/students` - Get all students\n- `POST /api/v1/students/enroll` - Enroll in a course\n\n### **Courses**\n\n- `GET /api/v1/courses` - Get all courses\n- `POST /api/v1/courses` - Create a new course (Admin)\n\n### **Booking**\n\n- `POST /api/v1/bookings` - Book a tutor session\n\n### **Reviews \u0026 Ratings**\n\n- `POST /api/v1/reviews` - Submit a review for a tutor/course\n\n### **Payments**\n\n- `POST /api/v1/payments` - Process a payment using SurjoPay\n\n---\n\n## 🛡️ Security \u0026 Best Practices\n\n- **JWT Authentication** for secure access\n- **Role-based access control** for different user types\n- **Data validation** using Zod\n- **Hashed passwords** with bcrypt\n\n---\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsakhawat71%2Ftutorlink-psql","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsakhawat71%2Ftutorlink-psql","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsakhawat71%2Ftutorlink-psql/lists"}