A modern CRM (Customer Relationship Management) system built with TypeScript, React, and Node.js. This application helps organizations manage their sales pipeline, contacts, and deals.
The project is organized as a monorepo with two main directories:
frontend/: React application built with Vite, TypeScript, and TailwindCSSbackend/: Node.js API built with Express, TypeScript, TypeORM, and PostgreSQL
- Authentication: User registration and login with JWT
- Organizations: Multi-organization support
- Contacts: Contact management system
- Workflows: Customizable sales pipeline workflows with stages
- Deals: Deal tracking through different pipeline stages
- Node.js (v18 or higher)
- pnpm (package manager)
- PostgreSQL database
Create a .env file in the backend directory with the following variables:
PORT=4000
JWT_SECRET=your-secret-key-change-in-production
DB_HOST=localhost
DB_PORT=5432
DB_USERNAME=postgres
DB_PASSWORD=postgres
DB_NAME=fullstack_db
NODE_ENV=development
- Clone the repository:
git clone <repository-url>
cd aura-fullstack-test- Install dependencies:
pnpm install- Set up the database:
Make sure PostgreSQL is running and create a database named fullstack_db (or the name specified in your environment variables).
- Run database migrations:
cd backend
pnpm migration:runTo run both frontend and backend in development mode:
pnpm devTo run only the frontend:
pnpm dev:frontendTo run only the backend:
pnpm dev:backendThe frontend will be available at: http://localhost:5173 The backend will be available at: http://localhost:4000
Run tests for both frontend and backend:
pnpm testRun tests for frontend only:
pnpm test:frontendRun tests for backend only:
pnpm test:backendBuild both frontend and backend:
pnpm build- React 18
- TypeScript
- React Router
- TailwindCSS
- Vite (build tool)
- Vitest (testing)
- Node.js
- Express
- TypeScript
- TypeORM (database ORM)
- PostgreSQL
- JWT Authentication
- Bcrypt (password hashing)
The backend follows a clean architecture approach with:
- Domain Layer: Core business logic and interfaces
- Application Layer: Use cases that orchestrate domain objects
- Infrastructure Layer: Implementation details (database, authentication)
- HTTP Layer: Controllers and routes
The frontend uses a component-based architecture with:
- Context API for state management
- Service modules for API communication
- React Router for navigation
- Auth:
/api/auth/register,/api/auth/login - Users:
/api/users - Organizations:
/api/organizations - Contacts:
/api/contacts - Workflows:
/api/workflows - Deals:
/api/deals - Health Check:
/api/health