{"id":49453703,"url":"https://github.com/weilyuwang/ticketing","last_synced_at":"2026-06-18T22:00:59.297Z","repository":{"id":39451659,"uuid":"270848340","full_name":"weilyuwang/ticketing","owner":"weilyuwang","description":"ReactJS + NodeJS full stack web app backed by Microservices and Event-Driven architecture with NATS Streaming. Containerized \u0026 Orchestrated with Docker + Kubernetes.","archived":false,"fork":false,"pushed_at":"2023-01-24T03:16:53.000Z","size":3783,"stargazers_count":21,"open_issues_count":99,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2023-03-08T04:11:29.672Z","etag":null,"topics":["event-driven-architecture","expressjs","ingress-nginx","kubernetes","microservices","nats-streaming-server","nextjs","nodejs","reactjs","server-side-rendering","skaffold"],"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/weilyuwang.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}},"created_at":"2020-06-08T22:48:43.000Z","updated_at":"2023-02-27T10:54:13.000Z","dependencies_parsed_at":"2023-02-13T14:45:50.552Z","dependency_job_id":null,"html_url":"https://github.com/weilyuwang/ticketing","commit_stats":null,"previous_names":[],"tags_count":null,"template":null,"template_full_name":null,"purl":"pkg:github/weilyuwang/ticketing","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weilyuwang%2Fticketing","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weilyuwang%2Fticketing/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weilyuwang%2Fticketing/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weilyuwang%2Fticketing/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/weilyuwang","download_url":"https://codeload.github.com/weilyuwang/ticketing/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weilyuwang%2Fticketing/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34508867,"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-06-18T02:00:06.871Z","response_time":128,"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":["event-driven-architecture","expressjs","ingress-nginx","kubernetes","microservices","nats-streaming-server","nextjs","nodejs","reactjs","server-side-rendering","skaffold"],"created_at":"2026-04-30T04:01:03.703Z","updated_at":"2026-06-18T22:00:59.287Z","avatar_url":"https://github.com/weilyuwang.png","language":"TypeScript","funding_links":[],"categories":["📦 Legacy \u0026 Inactive Projects"],"sub_categories":[],"readme":"# Ticketing App - Microservices \u0026 Event Driven Architecture\n\n## Local Dev\n\n#### Set up ingress-nginx controller  \n\n- This is required for both local dev K8s cluster and DigitalOcean K8s cluster\n\nCheck `ingress-nginx` documentation: https://kubernetes.github.io/ingress-nginx/\n\n---\n\n#### Create secret tokens in k8s cluster\n\n- This is required for both local dev k8s and DigitalOcean k8s   \n\n```\ne.g. To create a secret token in k8s cluster that is used for stripe payment service:\n\nkubectl create secret generic stripe-secret --from-literal STRIPE_KEY=[YOU_STRIPE_SECRET_KEY]\n\nAnd inside payment service k8s deployment config file (payments-depl.yaml):\n\n- name: STRIPE_KEY\n  valueFrom:\n    secretKeyRef:\n      name: stripe-secret\n      key: STRIPE_KEY\n      \n```\n\n---\n\n#### Set up mock host name (local dev)\n\n  - To redirect requests coming to: ticketing.dev =\u003e localhost      \n  - only for local development purposes\n\n  - MacOS/Linux:  \n  modify `/etc/hosts` file to include `127.0.0.1 ticketing.dev`\n\n  - Windows:  \n  modify `C:\\Windows\\System32\\Drivers\\etc\\hosts` file to include `127.0.0.1 ticketing.dev`\n\n  - To skip the unskippable HTTPS warning in Chrome:    \n  try type **thisisunsafe**\n\n---\n\n#### Skaffold (local dev)\n\nInstall Skaffold Dev Tool: `brew install skaffold`\n\nFrom root project directory: run `skaffold dev`\n\n---\n\n#### Authentication Strategies\n\n- Want no backend session storage when using Microservices architecture - so stick with `JWT`.\n\n- Want to use Server-Side Rendering and access user's auth information when HTML first gets rendered - so `store and transmit JWT within Cookies`, i.e. use cookies as a transport mechanism.\n\n- Want to be able to revoke a user - so use `short-lived JWT` (e.g. expired in 15 minutes) with `refresh` mechanism.\n\n\n## CI/CD: Github Actions\n\n\n## Deployment\n\n**Digital Ocean Kubernetes Cluster**\n\napp live at www.weilyuticketing.shop    \n***Update: the kubernetes cluster in digital ocean has been stopped***\n\n\n## Frontend Client\n\n#### Built with NextJS    \n\n  `Minimalistic ReactJS framework for rendering React app on the server. https://nextjs.org/`\n#### Routes  \n\n- /   \n  `Show list of all tickets`\n\n- /auth/signin    \n  `Show sign in form`\n\n- /auth/signup    \n  `Show sign up form`\n\n- /auth/signout   \n  `Sign out`    \n\n- /tickets/new    \n  `Form to create a new ticket`\n\n- /tickets/:ticketId    \n  `Details about a specific ticket`\n\n- /tickets/:orderId   \n  `Show info about an order and payment button`\n\n\n\n\n## Common NPM Module\n\nAll the commonly used classes, interfaces and middlewares, etc. are extracted into a published NPM Module.    \n\n- `@wwticketing/common`: https://www.npmjs.com/package/@wwticketing/common    \n\n  Contains commonly used Middlewares and Error Classes for ticketing microservices   \n\n  Source codes: https://github.com/weilyuwang/ticketing-common-lib\n\n\n\n## Backend API\n\n#### Microservices + Event-Driven Architecture \n\n- NATS Streaming Server\n\n#### Optimistic Concurrency Control\n\n- Leverage `mongoose-update-if-current` npm module to update mongodb documents' version.\n\n\n## auth service\n\n- GET /api/users/currentUser  \n  `Get current user's information`\n\u003e\n- POST /api/users/signup  \n{ \"email\": \"test@gmail.com\", \"password\": \"123456\" }   \n`User Sign up`\n\u003e\n- POST /api/users/signin    \n{ \"email\": \"test@gmail.com\", \"password\": \"123456\" }   \n`User sign in`\n\u003e\n- POST /api/users/signout   \n{}    \n`User sign out`\n\n\n### tickets service\n\n- GET /api/tickets  \n `Retrieve all tickets`\n\u003e\n- GET /api/tickets/:id    \n `Retrieve ticket with specific ID`\n\u003e\n- POST /api/tickets   \n { title: string, price: string }   \n `Create a ticket`\n\u003e\n- PUT /api/tickets/:id    \n  { title: string, price: string }    \n  `Update a ticket`\n\n\n### orders service\n\n- GET /api/orders   \n `Retrieve all active orders for the given user making the request`\n\u003e\n- GET /api/orders/:id   \n `Get details about a specific order`\n\u003e\n- POST /api/orders    \n  { ticketId: string }    \n  `Create an order to purchase the specified ticket`\n\u003e\n- DELETE /api/orders/:id    \n  `Cancel the order`\n\n\n### expiration service\n\n- BullJS    \n  Use `Bull.js` to manage job queues, with job delay option\n\n- Redis   \n  Use `Redis` to store list of jobs\n \n\n### payments service\n\n- StripeJS     \n  For handling payments\n\n- POST /api/payments   \n  { token: string, orderId: string}   \n  `Create new charge/payment`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fweilyuwang%2Fticketing","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fweilyuwang%2Fticketing","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fweilyuwang%2Fticketing/lists"}