https://github.com/rakesh5777/oxytrack-turbo
A robust full stack application that includes Prisma, Postgres, Express, Node.js, React, and TypeScript across both the frontend and backend, ensuring a strongly typed development environment.
https://github.com/rakesh5777/oxytrack-turbo
axios ex node openapi-generator openapi-specification openapi-typescript openapi-typescript-generator openapi3 postgresql pris react swagger-ui typescri zod
Last synced: 8 months ago
JSON representation
A robust full stack application that includes Prisma, Postgres, Express, Node.js, React, and TypeScript across both the frontend and backend, ensuring a strongly typed development environment.
- Host: GitHub
- URL: https://github.com/rakesh5777/oxytrack-turbo
- Owner: Rakesh5777
- Created: 2024-02-20T18:26:55.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-04-20T13:47:10.000Z (over 2 years ago)
- Last Synced: 2025-02-11T16:43:22.022Z (over 1 year ago)
- Topics: axios, ex, node, openapi-generator, openapi-specification, openapi-typescript, openapi-typescript-generator, openapi3, postgresql, pris, react, swagger-ui, typescri, zod
- Language: TypeScript
- Homepage:
- Size: 828 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# OxyTrack Turbo Project
Welcome to the OxyTrack Turbo project! This monorepo is built with Turbo Repo, utilizing a robust stack that includes Prisma, Postgres, Express, Node.js, React, and TypeScript across both the frontend and backend, ensuring a strongly typed development environment.
## Features
- **Monorepo Structure**: Organized into `apps/` for frontend/backend applications and `packages/` for shared logic or components.
- **OpenAPI Specification**: Utilizes OpenAPI spec as the source of truth for API design, with auto-generated TypeScript clients using `openapi-typescript` and `openapi-typescript-axios`.
- **Strong Typing**: Both frontend and backend are fully typed, enhancing development experience and code quality.
- **Database Flexibility**: Supports local Postgres setups as well as Docker-based environments for ease of development.
- **Development Workflow**: Integrates tools like Prettier, ESLint, Husky, and lint-staged for code formatting and linting, ensuring code consistency and quality.
## Getting Started
### Prerequisites
- Node.js (v18 or higher)
- pnpm (v8.9.0)
- Docker (for running Postgres in a container)
### Setup Instructions
1. **Clone the Repository**
Start by cloning this repository to your local machine.
2. **Environment Setup**
Rename `.example.env` to `.env` in both `apps/backend` and `packages/database`. This is crucial for configuring your environment variables correctly.
3. **Database Configuration**
Ensure you have a running Postgres database. You can use Docker as mentioned in the scripts section or set up a local instance.
4. **Install Dependencies**
Run `pnpm install` to install all required dependencies across the monorepo.
5. **Start Development Server**
To start the development server, run `turbo run dev`.
## Useful Scripts
Defined within the `turbo.json` pipeline, these commands are key to the project's development and deployment processes:
- **Prisma Commands**:
- `turbo run db:generate`: Generates Prisma client artifacts, essential for interacting with your database in a type-safe manner.
- `turbo run db:push`: Updates the database schema during development without applying migrations, useful for quick iterations.
- `turbo run db:migrate`: Applies database migrations, ensuring your database schema matches your Prisma schema.
- **API Contract and Client Generation**:
- `turbo run build-api-contract`: Bundles the OpenAPI spec and generates TypeScript Axios clients, ensuring frontend and backend communicate over a strongly typed API.
- **Turbo Commands**:
- `turbo run build`: Compiles the project for production, ensuring all dependencies like Prisma client and API contracts are generated and up-to-date.
- `turbo run dev`: Starts the development server, watching for changes in your source code and automatically recompiling.
## Project Structure
- `apps/*`: Contains the frontend and backend applications.
- `packages/*`: Includes shared libraries, configurations, and utility functions.
## Additional Resources
- [Turbo Repo Documentation](https://turborepo.org/docs)
- [Prisma Documentation](https://www.prisma.io/docs/)
- [OpenAPI Specification](https://swagger.io/specification/)
- [TypeScript](https://www.typescriptlang.org/docs/)
- [Postgres Docker Setup](https://docs.docker.com/samples/postgresql_service/)
## Contributing
Contributions are welcome! Please follow the established coding conventions and pull request process.
---
Thank you for choosing OxyTrack Turbo Repo for your development needs. Happy coding!