{"id":18822100,"url":"https://github.com/proyecto26/projectx","last_synced_at":"2025-09-02T20:33:49.657Z","repository":{"id":260156320,"uuid":"868623755","full_name":"proyecto26/projectx","owner":"proyecto26","description":"Tame full-stack chaos with Temporal workflows and React wizardry, the ultimate event-driven architecture for your apps 🧙‍♂️✨","archived":false,"fork":false,"pushed_at":"2024-11-23T05:33:35.000Z","size":1189,"stargazers_count":23,"open_issues_count":3,"forks_count":0,"subscribers_count":1,"default_branch":"develop","last_synced_at":"2024-12-29T05:33:53.464Z","etag":null,"topics":["event-driven-architecture","event-driven-microservices","full-stack","full-stack-application","full-stack-developer","full-stack-development","full-stack-web-development","monorepo","monorepo-boilerplate","nestjs","nestjs-boilerplate","nodejs","nx-monorepo","react","reactjs","remix","remix-run","temporal","temporalio"],"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/proyecto26.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},"funding":{"github":"jdnichollsc","patreon":"proyecto26","open_collective":"proyecto26","ko_fi":"proyecto26","liberapay":"proyecto26","donorbox":"proyecto-26","custom":["paypal.me/jdnichollsc","buymeacoffee.com/jdnichollsc","donorbox.org/proyecto-26"]}},"created_at":"2024-10-06T21:06:32.000Z","updated_at":"2024-12-23T15:31:59.000Z","dependencies_parsed_at":"2024-11-17T22:25:06.317Z","dependency_job_id":"dfc0f6d4-2899-40f1-900d-34aea28078d2","html_url":"https://github.com/proyecto26/projectx","commit_stats":null,"previous_names":["proyecto26/temporal-workshop-cityjs"],"tags_count":0,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/proyecto26%2Fprojectx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/proyecto26%2Fprojectx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/proyecto26%2Fprojectx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/proyecto26%2Fprojectx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/proyecto26","download_url":"https://codeload.github.com/proyecto26/projectx/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":231810745,"owners_count":18430003,"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":["event-driven-architecture","event-driven-microservices","full-stack","full-stack-application","full-stack-developer","full-stack-development","full-stack-web-development","monorepo","monorepo-boilerplate","nestjs","nestjs-boilerplate","nodejs","nx-monorepo","react","reactjs","remix","remix-run","temporal","temporalio"],"created_at":"2024-11-08T00:47:50.083Z","updated_at":"2025-09-02T20:33:49.645Z","avatar_url":"https://github.com/proyecto26.png","language":"TypeScript","readme":"# ProjectX\n\n\u003cp align=\"center\"\u003e\n  \u003cimg width=\"100px\" alt=\"Nx for Monorepo\" src=\"https://avatars.githubusercontent.com/u/23692104?s=200\u0026v=4\"\u003e\n  \u003cimg width=\"100px\" alt=\"Remix for Website\" src=\"https://avatars.githubusercontent.com/u/64235328?s=200\u0026v=4\"\u003e\n  \u003cimg width=\"300px\" alt=\"ProjectX logo\" src=\"https://github.com/user-attachments/assets/eecd8520-1e78-4ec7-8a12-55b62e5771c6\"\u003e\n  \u003cimg width=\"100px\" alt=\"NestJS for Services\" src=\"https://avatars.githubusercontent.com/u/28507035?s=200\u0026v=4\"\u003e\n  \u003cimg width=\"100px\" alt=\"Temporal for Durable Executions\" src=\"https://avatars.githubusercontent.com/u/56493103?s=200\u0026v=4\"\u003e\n\u003c/p\u003e\n\n\u003e **ProjectX** is a comprehensive full-stack template designed to simplify the development of scalable and resilient applications using **React** and **Temporal**. By integrating Temporal's advanced workflow orchestration with React's dynamic frontend framework, ProjectX enables developers to build applications with durable executions and seamless communication between services.\n\n## Why Temporal? 🤔\n\n\u003cpre align=\"center\" role=\"img\" aria-label=\"ASCII Temporal\"\u003e\n████████╗███████╗███╗   ███╗██████╗  ██████╗ ██████╗  █████╗ ██╗     \n╚══██╔══╝██╔════╝████╗ ████║██╔══██╗██╔═══██╗██╔══██╗██╔══██╗██║     \n   ██║   █████╗  ██╔████╔██║██████╔╝██║   ██║██████╔╝███████║██║     \n   ██║   ██╔══╝  ██║╚██╔╝██║██╔═══╝ ██║   ██║██╔══██╗██╔══██║██║     \n   ██║   ███████╗██║ ╚═╝ ██║██║     ╚██████╔╝██║  ██║██║  ██║███████╗\n   ╚═╝   ╚══════╝╚═╝     ╚═╝╚═╝      ╚═════╝ ╚═╝  ╚═╝╚═╝  ╚═╝╚══════╝\n\u003c/pre\u003e\n\n### Challenges of Maintaining State in Distributed Systems\n\n- Consistency\n- Fault Tolerance\n- Scalability\n- Concurrency Control\n- Security\n\n**Temporal** is introduced here as a **Workflow Orchestration** tool for managing long-running operations **(durable execution)**, human-in-the-loop and system lifecycle **(state management, guaranteed completion with compensations and uniqueness)**. \nYou can use **Temporal** today to implement sequences of steps/actions in a specific order for your business processes **(workflows)**, \nnot only for communication between services **(Microservices Orchestration)** but also within **Monolithic** apps. \n**Workflows** can react to asynchronous and external events **(signals, updates)**, aggregate data and perform actions **(activities)** with exponential retries **(retry policy)** and run for extended periods **(heartbeat)** if needed, then you can check the state of these executions at any time **(queries)**.\nAdditionally, workflows support scheduled and time-based executions with configurable delays to handle recurring business logic **(scheduling)**.\n\n### Use Cases\n\n•\t**Order Processing Systems:** Managing the lifecycle of orders from placement to fulfillment, including inventory checks, payment processing, and shipping.\n\n•\t**User Onboarding:** Coordinating steps involved in onboarding new users, such as account creation, email verification, and initial setup tasks.\n\n•\t**Data Pipelines:** Orchestrating data ingestion, transformation, and storage processes with reliability and scalability.\n\n•\t**Batch Processing:** Handling large-scale batch jobs with retry mechanisms and progress monitoring.\n\n## Getting Started 🚀\n\n### Prerequisites 🧰\n\n- [Docker Compose](https://docs.docker.com/compose/install)\n- [Node.js LTS Version](https://nodejs.org)\n- [Git](https://git-scm.com/downloads)\n\n### Quick Setup 🛠️\n\n1. **Clone and Setup Environment:**\n```bash\ngit clone https://github.com/proyecto26/projectx.git\ncd projectx\ncp .env.example .env\n```\n\n2. **Start Development Environment:**\n```bash\n# Build and start all services (db, temporal, backend services)\ndocker-compose up -d\n\n# Start web application\nnpm install\nnpm run dev:web\n```\n\n### Documentation 📚\n\nFor detailed information about the project, please refer to:\n- [Architecture Overview](./docs/architecture/README.md)\n- [Frontend Guide](./docs/frontend/README.md)\n- [Backend Guide](./docs/backend/README.md)\n\n## Project Structure Overview\n\n\u003cimg width=\"1643\" alt=\"image\" src=\"https://github.com/user-attachments/assets/82e99efc-640d-4ba4-a485-c92c0184f473\"\u003e\n\n\n\u003cdetails\u003e\n  \u003csummary\u003e\u003cb\u003eMarkmap format 🍬\u003c/b\u003e\u003c/summary\u003e\n\n```markmap\n#### Root Directory\n\n- **package.json**: Contains the dependencies and scripts for the entire monorepo.\n- **nx.json**: Configuration for Nx, which manages the monorepo structure and build processes.\n- **tsconfig.base.json**: Base TypeScript configuration shared across the project.\n\n#### Apps\n\n- **apps/auth**: \n  - **Purpose**: Handles user authentication and data retrieval.\n  - **Key Features**: Login, registration, and user profile management.\n\n- **apps/order**: \n  - **Purpose**: Manages order processing, checkout, and payment handling.\n  - **Key Features**: Cart management, order tracking, and payment integration.\n\n- **apps/product**: \n  - **Purpose**: Manages product catalog and inventory.\n  - **Key Features**: Product listing, details, and inventory management.\n\n- **apps/web**: \n  - **Purpose**: The main web application interface.\n  - **Key Features**: User interaction with the system.\n  - **Configuration**: \n    - **tsconfig.json**: TypeScript configuration specific to the web app.\n\n#### Libs\n\n- **libs/backend/core**: \n  - **Purpose**: Contains business logic and common utilities.\n  - **Key Features**: Shared functions and services used across backend applications.\n\n- **libs/backend/db**: \n  - **Purpose**: Manages database access using Prisma and the Repository pattern.\n  - **Key Features**: Database schema definitions and data access layers.\n  - **Documentation**: \n    - **README.md**: Provides details on database setup and usage.\n\n- **libs/backend/email**: \n  - **Purpose**: Handles email template creation and sending.\n  - **Key Features**: Uses MJML for templates and provides email sending services.\n\n- **libs/models**: \n  - **Purpose**: Defines DTOs and common types.\n  - **Key Features**: Ensures consistency across web and backend services.\n\n- **libs/frontend/ui**: \n  - **Purpose**: Contains UI components and themes.\n  - **Key Features**: Built with React and TailwindCSS, includes Storybook for component visualization.\n  - **Configuration**: \n    - **package.json**: Dependencies and scripts for the UI library.\n    - **tsconfig.json**: TypeScript configuration for the UI library.\n\n#### Additional paths\n\n- **prompts**: Contains initial project prompts or guidelines to be used with your AI tools (Cursor, etc).\n```\n\u003c/details\u003e\n\n\n\n\n\u003e [!TIP]\n\u003e View the Database diagram [here](./libs/backend/db/README.md).\n\n\n\n\n## Development Tools 🔧\n\n### Monorepo Management\n```bash\n# View project structure\nnpx nx show projects\nnpx nx graph\n\n# Move project location\nnpx nx g @nx/workspace:move --project core libs/backend/common\n```\n\n### UI Development\n```bash\n# Run Storybook\nnpm run storybook\n```\n\n### Project Updates\n```bash\nnpx nx migrate latest\nnpx nx migrate --run-migrations\n```\n\n## Docker Configuration 🐳\n\nServices defined in [docker-compose.yml](./docker-compose.yml):\n- PostgreSQL with PostGIS\n- Temporal server and UI\n- Auth, Order, and Product services\n\n### Common Commands\n```bash\n# Build fresh images\ndocker-compose build --no-cache\n\n# Start services\ndocker-compose up -d\n\n# Remove services and volumes\ndocker-compose down --volumes\n```\n\n## Notable Links 🤓\n\n- [Get started with Temporal and TypeScript](https://github.com/temporalio/sdk-typescript)\n- [Workflow Messages - TypeScript SDK](https://docs.temporal.io/develop/typescript/message-passing)\n\n### Public Courses\n\n- [Temporal 101 with TypeScript](https://temporal.talentlms.com/catalog/info/id:135)\n- [Temporal 102: Exploring Durable Execution with TypeScript](https://temporal.talentlms.com/catalog/info/id:165)\n- [Versioning Workflows with TypeScript](https://temporal.talentlms.com/catalog/info/id:171)\n- [Interacting with Workflows with TypeScript](https://temporal.talentlms.com/catalog/info/id:207)\n- [Securing Temporal Applications with TypeScript](https://temporal.talentlms.com/catalog/info/id:211)\n- [Introduction to Temporal Cloud](https://temporal.talentlms.com/catalog/info/id:144)\n- [Crafting an Error Handling Strategy with TypeScript](https://temporal.talentlms.com/catalog/info/id:244)\n\n## Payment Providers\n\n- Stripe:\n  - [Webhooks](https://docs.stripe.com/webhooks?lang=node)\n  - [Stripe Webhook integration](https://docs.stripe.com/api/webhook_endpoints)\n  - [Stripe Checkout](https://docs.stripe.com/payments/checkout)\n  - [Webhooks Dashboard](https://dashboard.stripe.com/test/workbench/webhooks)\n  - [Automatic fulfillment Orders](https://docs.stripe.com/checkout/fulfillment)\n  - [Interactive webhook endpoint builder](https://docs.stripe.com/webhooks/quickstart)\n  - [Trigger webhook events with the Stripe CLI](https://docs.stripe.com/stripe-cli/triggers)\n  - [Testing cards](https://docs.stripe.com/testing#cards)\n- Stripe commands for testing webhooks:\n```bash\nbrew install stripe/stripe-cli/stripe\nstripe login --api-key ...\nstripe trigger payment_intent.succeeded\nstripe listen --forward-to localhost:8081/order/webhook // or using the secure tunnel created by Ngrok\n```\n\n## Supporting 🍻\nI believe in Unicorns 🦄\nSupport [me](http://www.paypal.me/jdnichollsc/2), if you do too.\n\nDonate **Ethereum**, **ADA**, **BNB**, **SHIBA**, **USDT/USDC**, **DOGE**, etc:\n\n\u003e Wallet address: jdnichollsc.eth\n\nPlease let us know your contributions! 🙏\n\n## Happy coding 💯\nMade with ❤️\n\n\u003cpre role=\"img\" aria-label=\"ASCII Made with Temporal\"\u003e\n╔╦╗╔═╗╔╦╗╔═╗╔═╗╦═╗╔═╗╦   \u003cimg width=\"150px\" src=\"https://avatars0.githubusercontent.com/u/28855608?s=200\u0026v=4\" align=\"right\"\u003e\n ║ ║╣ ║║║╠═╝║ ║╠╦╝╠═╣║  \n ╩ ╚═╝╩ ╩╩  ╚═╝╩╚═╩ ╩╩═╝⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀\n\u003c/pre\u003e\n\n\n","funding_links":["https://github.com/sponsors/jdnichollsc","https://patreon.com/proyecto26","https://opencollective.com/proyecto26","https://ko-fi.com/proyecto26","https://liberapay.com/proyecto26","proyecto-26","paypal.me/jdnichollsc","buymeacoffee.com/jdnichollsc","donorbox.org/proyecto-26","http://www.paypal.me/jdnichollsc/2"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fproyecto26%2Fprojectx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fproyecto26%2Fprojectx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fproyecto26%2Fprojectx/lists"}