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.
βββββββββββββββββββββ βββββββββββ βββββββ βββββββ ββββββ βββ ββββββββββββββββββββββ βββββββββββββββββββββββββββββββββββββββββ βββ ββββββ ββββββββββββββββββββββ ββββββββββββββββββββββ βββ ββββββ ββββββββββββββββββ βββ ββββββββββββββββββββββ βββ βββββββββββ βββ ββββββ ββββββββββββ ββββββ βββββββββββ βββ βββββββββββ ββββββ βββββββ βββ ββββββ βββββββββββ
- Consistency
- Fault Tolerance
- Scalability
- Concurrency Control
- Security
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). You can use Temporal today to implement sequences of steps/actions in a specific order for your business processes (workflows), not only for communication between services (Microservices Orchestration) but also within Monolithic apps. 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). Additionally, workflows support scheduled and time-based executions with configurable delays to handle recurring business logic (scheduling).
β’ Order Processing Systems: Managing the lifecycle of orders from placement to fulfillment, including inventory checks, payment processing, and shipping.
β’ User Onboarding: Coordinating steps involved in onboarding new users, such as account creation, email verification, and initial setup tasks.
β’ Data Pipelines: Orchestrating data ingestion, transformation, and storage processes with reliability and scalability.
β’ Batch Processing: Handling large-scale batch jobs with retry mechanisms and progress monitoring.
- Clone and Setup Environment:
git clone https://github.com/proyecto26/projectx.git
cd projectx
cp .env.example .env
- Start Development Environment:
# Build and start all services (db, temporal, backend services)
docker-compose up -d
# Start web application
npm install
npm run dev:web
For detailed information about the project, please refer to:

Markmap format π¬
#### Root Directory
- **package.json**: Contains the dependencies and scripts for the entire monorepo.
- **nx.json**: Configuration for Nx, which manages the monorepo structure and build processes.
- **tsconfig.base.json**: Base TypeScript configuration shared across the project.
#### Apps
- **apps/auth**:
- **Purpose**: Handles user authentication and data retrieval.
- **Key Features**: Login, registration, and user profile management.
- **apps/order**:
- **Purpose**: Manages order processing, checkout, and payment handling.
- **Key Features**: Cart management, order tracking, and payment integration.
- **apps/product**:
- **Purpose**: Manages product catalog and inventory.
- **Key Features**: Product listing, details, and inventory management.
- **apps/web**:
- **Purpose**: The main web application interface.
- **Key Features**: User interaction with the system.
- **Configuration**:
- **tsconfig.json**: TypeScript configuration specific to the web app.
#### Libs
- **libs/backend/core**:
- **Purpose**: Contains business logic and common utilities.
- **Key Features**: Shared functions and services used across backend applications.
- **libs/backend/db**:
- **Purpose**: Manages database access using Prisma and the Repository pattern.
- **Key Features**: Database schema definitions and data access layers.
- **Documentation**:
- **README.md**: Provides details on database setup and usage.
- **libs/backend/email**:
- **Purpose**: Handles email template creation and sending.
- **Key Features**: Uses MJML for templates and provides email sending services.
- **libs/models**:
- **Purpose**: Defines DTOs and common types.
- **Key Features**: Ensures consistency across web and backend services.
- **libs/frontend/ui**:
- **Purpose**: Contains UI components and themes.
- **Key Features**: Built with React and TailwindCSS, includes Storybook for component visualization.
- **Configuration**:
- **package.json**: Dependencies and scripts for the UI library.
- **tsconfig.json**: TypeScript configuration for the UI library.
#### Additional paths
- **prompts**: Contains initial project prompts or guidelines to be used with your AI tools (Cursor, etc).
Tip
View the Database diagram here.
# View project structure
npx nx show projects
npx nx graph
# Move project location
npx nx g @nx/workspace:move --project core libs/backend/common
# Run Storybook
npm run storybook
npx nx migrate latest
npx nx migrate --run-migrations
Services defined in docker-compose.yml:
- PostgreSQL with PostGIS
- Temporal server and UI
- Auth, Order, and Product services
# Build fresh images
docker-compose build --no-cache
# Start services
docker-compose up -d
# Remove services and volumes
docker-compose down --volumes
- Temporal 101 with TypeScript
- Temporal 102: Exploring Durable Execution with TypeScript
- Versioning Workflows with TypeScript
- Interacting with Workflows with TypeScript
- Securing Temporal Applications with TypeScript
- Introduction to Temporal Cloud
- Crafting an Error Handling Strategy with TypeScript
- Stripe:
- Stripe commands for testing webhooks:
brew install stripe/stripe-cli/stripe
stripe login --api-key ...
stripe trigger payment_intent.succeeded
stripe listen --forward-to localhost:8081/order/webhook // or using the secure tunnel created by Ngrok
I believe in Unicorns π¦ Support me, if you do too.
Donate Ethereum, ADA, BNB, SHIBA, USDT/USDC, DOGE, etc:
Wallet address: jdnichollsc.eth
Please let us know your contributions! π
Made with β€οΈ
ββ¦ββββββ¦ββββββββ¦ββββββ¦β ββ£ ββββ βββ ββ β¦ββ ββ£β β© ββββ© β©β© ββββ©βββ© β©β©βββ β β β β β β β β β β β β