{"id":18824195,"url":"https://github.com/cre8stevedev/salonix-backend","last_synced_at":"2025-10-23T20:08:09.526Z","repository":{"id":248299057,"uuid":"828240570","full_name":"Cre8steveDev/salonix-backend","owner":"Cre8steveDev","description":"# Backend (API) for my Salonix Mobile Application (Cross-platform). The server will provide complete User Management System (Authentication and Storage).","archived":false,"fork":false,"pushed_at":"2024-07-23T01:34:38.000Z","size":57,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-12-30T04:27:00.499Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/Cre8steveDev.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}},"created_at":"2024-07-13T14:34:36.000Z","updated_at":"2024-07-23T01:34:41.000Z","dependencies_parsed_at":"2024-12-30T04:35:41.530Z","dependency_job_id":null,"html_url":"https://github.com/Cre8steveDev/salonix-backend","commit_stats":null,"previous_names":["cre8stevedev/salonix-backend"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cre8steveDev%2Fsalonix-backend","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cre8steveDev%2Fsalonix-backend/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cre8steveDev%2Fsalonix-backend/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cre8steveDev%2Fsalonix-backend/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Cre8steveDev","download_url":"https://codeload.github.com/Cre8steveDev/salonix-backend/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239761066,"owners_count":19692432,"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","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":[],"created_at":"2024-11-08T00:55:49.919Z","updated_at":"2025-10-23T20:08:04.490Z","avatar_url":"https://github.com/Cre8steveDev.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Salonix - A Full-featured Salon Booking System for Cross-platform applications\n\nThis repository will serve as the backend providing REST resources to the frontend of the application and can be extended to any other application.\n\n## About the Project\n\nAs part of my building my skills in building full stack applications on native applications (Currently Android - using Expo Go Framework). I'm building Salonix (Just after building Quotix - which I used as a hands-on project to improve my knowledge of mobile development) - This is the Codebase for the Backend.\n\n## AUTHOR\n\n- Stephen Omoregie\n- \u003ccre8stevedev@gmail.com\u003e\n- Twitter: [@Cre8steveDev](https://twitter.com/Cre8steveDev)\n- LinkedIn: \u003chttps://www.linkedin.com/in/stephen-omoregie/\u003e\n- Portfolio: [Visit my Portfolio](https://cre8stevedev.me/)\n- Available for Work: _YES_\n-\n\n## Features\n\n- Custom authentication and authorization flow using JWT ✅\n- Interval-based token refresh for enhanced session management ✅\n- MongoDB integration with transaction support for data consistency ✅\n- RESTful API endpoints for salon service management, user profiles, and appointments ✅\n- Modular code structure with route handlers and controllers ✅\n\n## Technologies Used for the Backend of this project\n\n- NodeJS (ExpressJs Framework)\n- TypeScript - For Typesafety and ease during development\n- MongoDB - NoSQL Database (Hosted remotely on MongoDB Atlas)\n- JSONWebTokens - For Signing Authentication for the user\n- MongoDB transactions for data integrity\n- Postman - for testing API Endpoints\n\n## Installation\n\nClone the repository\n\n```bash\ngit clone https://github.com/Cre8steveDev/salonix-backend.git\n```\n\nNavigate to the project directory\n\n```bash\ncd salonix-backend\n```\n\nInstall dependencies\n\n```bash\nnpm install\n```\n\nSet up environment variables:\n\n- Create a `.env` file in the root directory and add the following:\n\n```javascript\nMONGO_URI=\nPORT=\nCOOKIE_SECRET=\nSESSION_SECRET=\nPAYSTACK_KEY=\n```\n\nStart the development server\n\n```bash\nnpm run dev\n```\n\n## API Lazy Documentation\n\n### Authentication / Authenticated Routes\n\n```bash\nPOST {{HOST_URL}}/api/auth/signup\nPOST {{HOST_URL}}/api/auth/signin\nGET {{HOST_URL}}/api/auth/refresh-token 🔐\nGET {{HOST_URL}}/api/auth/get-wallet 🔐\nPOST {{HOST_URL}}/api/auth/update-wallet 🔐\n```\n\n### Resources Endpoint\n\n```bash\nGET {{HOST_URL}}/api/resources/services/:serviceID\nGET {{HOST_URL}}/api/resources/popular\n```\n\n### Seed the database with data for the Services/Popular Styles during development\n\n```bash\nPOST {{HOST_URL}}/api/resources/services/seed\nPOST {{HOST_URL}}/api/resources/popular/seed\n```\n\n### Insert the JSON Data below for the Services into your Database\n\nYou can find the data in the json file `./Salonix.services.json`\n\n### Insert the JSON Data below for the Popular Hairstyles into your Database\n\nYou can find the data in the json file `./Salonix.popularhairstyles.json`\n\nStudy the schema to understand the document.\n\n### Getting Appointment Data\n\n```bash\nGET {{HOST_URL}}/api/appointments/day/:date\nPOST {{HOST_URL}}/api/appointments/book 🔐\nGET {{HOST_URL}}/api/appointments/all-appointments\n\n```\n\n## Database Schema\n\n[Describe your MongoDB schema, including main collections and their relationships]\n\n## Authentication Flow\n\nThe backend implements a custom authentication flow:\n\n- User registration/login\n- JWT token generation\n- Interval-based token refresh\n- Secure routes with JWT middleware\n\n## Data Consistency\n\nMongoDB transactions are used to ensure atomicity and data consistency, particularly for multi-update operation as when the user Books an appointment:\n\n- Updating user account balances\n- Recording transactions in user wallet document\n- Updating user appointment array\n\n## Development\n\nThis project uses TypeScript for improved type safety and development experience.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcre8stevedev%2Fsalonix-backend","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcre8stevedev%2Fsalonix-backend","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcre8stevedev%2Fsalonix-backend/lists"}