{"id":34600838,"url":"https://github.com/gah-code/photo-booking-api","last_synced_at":"2026-05-28T11:31:00.497Z","repository":{"id":284264548,"uuid":"954371156","full_name":"gah-code/photo-booking-api","owner":"gah-code","description":null,"archived":false,"fork":false,"pushed_at":"2025-03-25T01:30:40.000Z","size":748,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-25T02:32:51.878Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/gah-code.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":"2025-03-25T01:28:58.000Z","updated_at":"2025-03-25T01:30:44.000Z","dependencies_parsed_at":"2025-03-25T02:32:54.922Z","dependency_job_id":null,"html_url":"https://github.com/gah-code/photo-booking-api","commit_stats":null,"previous_names":["gah-code/photo-booking-api"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/gah-code/photo-booking-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gah-code%2Fphoto-booking-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gah-code%2Fphoto-booking-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gah-code%2Fphoto-booking-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gah-code%2Fphoto-booking-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gah-code","download_url":"https://codeload.github.com/gah-code/photo-booking-api/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gah-code%2Fphoto-booking-api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33607334,"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-05-28T02:00:06.440Z","response_time":99,"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":[],"created_at":"2025-12-24T12:43:12.484Z","updated_at":"2026-05-28T11:31:00.492Z","avatar_url":"https://github.com/gah-code.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# photo-booking-api\n\nHere’s a clean, GitHub-friendly `README.md` for your **Photo Booking API project** with:\n\n- ✅ Chapters for quick linking\n- ✅ Technologies used (Vite, Render, Supabase, etc.)\n- ✅ Current project state\n- ✅ Summary of improvements\n- ✅ How to run and test it locally\n\n---\n\n## 📸 Photo Booking API\n\nA simple and extendable Node.js + Express API for managing **photography bookings, packages, and locations** — built for testing and integration with a React front-end.  \n\nHosted live on **Render** with static assets from **Supabase Storage**.\n\n---\n\n## 📚 Table of Contents\n\n- [🧰 Tech Stack \u0026 Services](#-tech-stack--services)\n- [🚀 Live API Endpoints](#-live-api-endpoints)\n- [📦 Project Structure](#-project-structure)\n- [📌 Current Features](#-current-features)\n- [✨ Summary of Improvements](#-summary-of-improvements)\n- [🔧 Getting Started](#-getting-started)\n- [🧪 Testing Locally](#-testing-locally)\n- [🗺 Future Enhancements](#-future-enhancements)\n\n---\n\n## 🧰 Tech Stack \u0026 Services\n\n- **Node.js + Express** – Backend framework\n- **Vite + React** – Frontend for testing components\n- **Render** – Hosting the API\n- **Supabase** – Public CDN image storage\n- **Postman / Hoppscotch** – Manual API testing\n- **In-memory data** – Temporary mock DB for testing\n\n---\n\n## 🚀 Live API Endpoints\n\n| Type        | Route                                      | Description                 |\n|-------------|--------------------------------------------|-----------------------------|\n| GET         | `/api/bookings`                            | List all bookings           |\n| POST        | `/api/bookings`                            | Create a new booking        |\n| PATCH       | `/api/bookings/:id`                        | Update a booking            |\n| GET         | `/api/locations`                           | Get all photography spots   |\n| GET         | `/api/packages`                            | Get all available packages  |\n| POST        | `/api/packages`                            | Create a new package        |\n| PATCH       | `/api/packages/:id`                        | Update a package            |\n| GET         | `/api/packages/:id`                        | Fetch a specific package    |\n\n\u003e 🌐 Base URL: `https://photo-booking-api.onrender.com/api`\n\n---\n\n## 📦 Project Structure\n\n```bash\nphoto-booking-api/\n├── routes/\n│   ├── bookings.js\n│   ├── locations.js\n│   └── packages.js\n├── server.js\n├── .env.example\n├── .gitignore\n└── README.md\n```\n\n---\n\n## 📌 Current Features\n\n- ✅ **Bookings**: Create, fetch, update bookings\n- ✅ **Packages**: Custom photo packages with price, season, sold-out support\n- ✅ **Locations**: Static photography locations with images and descriptions\n- ✅ JSON-based in-memory data (no DB setup required)\n- ✅ Integration-ready for Vite + React frontend\n- ✅ Styled API responses for frontend rendering\n\n---\n\n## ✨ Summary of Improvements\n\n| Area            | Before                            | After (Now)                                       |\n|-----------------|------------------------------------|--------------------------------------------------|\n| 📦 Packages     | Static only, no create/update     | Supports `POST`, `PATCH`, season array, soldOut  |\n| 📍 Locations    | None                              | `GET` added, structured for menus                |\n| 🧾 Bookings     | Read only                         | Now supports creation + update with validation   |\n| 📄 Readability  | Raw structure                     | Cleaner route logic, consistent formatting       |\n| 🌐 Deployments  | Local only                        | Deployed on Render with public API URL           |\n| 🔧 Dev UX       | No docs, no structure             | Full README + `.env.example` + modular routes    |\n\n---\n\n## 🔧 Getting Started\n\n```bash\n# 1. Clone the project\ngit clone https://github.com/your-username/photo-booking-api.git\ncd photo-booking-api\n\n# 2. Install dependencies\nnpm install\n\n# 3. Start the server\nnpm start\n```\n\n\u003e Local API will be available at: `http://localhost:3000/api`\n\n---\n\n## 🧪 Testing Locally\n\nYou can test the API using:\n\n### 🧪 Postman / Hoppscotch\n\n- `POST /api/packages`\n- `PATCH /api/packages/:id`\n- `GET /api/bookings`\n\n### 🧪 Example POST Body\n\n```json\n{\n  \"name\": \"Sunset Beach Package\",\n  \"unitPrice\": 200,\n  \"imageUrl\": \"https://example.com/image.jpg\",\n  \"soldOut\": false,\n  \"season\": [\"july\", \"august\"]\n}\n```\n\n---\n\n## 🗺 Future Enhancements\n\n- 🔐 Add authentication (JWT or Supabase Auth)\n- 💾 Migrate to a real database (Supabase, MongoDB, or PostgreSQL)\n- 🧑‍💻 Admin dashboard to manage bookings and packages\n- 🖼 Image upload using Supabase or Cloudinary\n- 📤 Email notifications for bookings\n\n---\n\n\u003e Built with ❤️ by Gilbert Haro\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgah-code%2Fphoto-booking-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgah-code%2Fphoto-booking-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgah-code%2Fphoto-booking-api/lists"}