Skip to content

amrbashir/erp-system

Repository files navigation

erp-system

Building an ERP system for a local store in public.

Development

Prerequisites:

  1. Deno
  2. Docker

Setup:

  1. Install Deps deno install
  2. Start docker compose: docker compose up -d
  3. Generate prisma client deno task -r prisma:generate
  4. Run database migrations: deno task -r prisma:migrate:dev

Running the Application

deno task dev

Running Tests

  1. Run tests: deno test
  2. Run linting: deno lint

Tracing

Open the Grafana Dashboard on https://localhost:3000, to view the traces.

Architecture

The ERP system follows a modern, monorepo-based architecture with clear separation of concerns:

  • Framework: tRPC for type-safe API development.
  • Database: PostgreSQL with Prisma ORM for type-safe database access.
  • Authentication: Session-based authentication.
  • Framework: React with Vite for fast development and building.
  • Routing: TanStack Router for type-safe routing.
  • State Management: TanStack Query with tRPC for end-to-end type-safe API communication.
  • UI Components: Shadcn/ui and Tailwind CSS.
  • Internationalization: i18next for multi-language support (English and Arabic).

Deployment

  • Backend: Deployed on Deno Deploy.
  • Frontend: Deployed as a SPA and served from same instance as backend on Deno Deploy.
  • Database: Managed PostgreSQL on Neon

LICENSE

MIT License

Sponsor this project