The EMPLEAME Backend is the server-side application that handles business logic, data management, and integrations with external services. It's an API focused on efficiently serving data using GraphQL and managing real-time events via WebSockets.
- GraphQL API: Flexible and typed data querying using Apollo Server (Code-First).
- Advanced Authentication: JWT-based auth with support for Local, Google, and Facebook strategies.
- Role-Based Access Control: Granular permissions for Admins, Employers, and Job Seekers.
- Payment Ecosystem: Full integration with Stripe for subscriptions and one-time payments.
- Real-time Engine: WebSockets gateway for instant notifications and updates.
- Media Management: Cloudinary integration for optimized image uploading and processing.
- Transactional Email: Automated email workflows via Nodemailer.
- Core: NestJS (v10)
- Language: TypeScript
- Database: PostgreSQL & TypeORM
- API: GraphQL & Socket.io
- Payments: Stripe SDK
- Validation: Class-validator & Joi
- Node.js (v18+)
- PostgreSQL (running locally or via Docker)
- npm or pnpm
-
Clone the repository:
git clone https://github.com/igidio/emplea.me-backend-services.git cd emplea.me-backend-services -
Install dependencies:
npm install # or pnpm install -
Environment Configuration: Rename the template environment file and configure your variables:
cp .template.env .env
-
Database Setup: If you have Docker installed, configure the file 📄 docker-compose.yaml with the appropriate settings for your PostgreSQL instance. Then, run the following command to start the PostgreSQL database:
docker-compose up -d
-
Run Database Migrations and Seeds: Ensure your database is running and execute the migrations and seeds to set up the schema:
# Run TypeORM migrations npm run typeorm:generate # Run seeders to populate initial data npm run seed:fresh
-
Start the Application:
npm run start:dev
If everything is set up correctly, the application should now be running on http://localhost:3000.
Extra: if you want to use husky for git hooks and commit lints, run:
npx husky init- 📁 src/
- 📄 app.module.ts - Main application module
- 📄 main.ts - Entry point of the application
- 📁 common/ - Shared utilities, guards, interceptors, and decorators
- 📁 config/ - Configuration files and environment settings
- 📁 modules/ - Feature modules (Auth, Users, Jobs, Payments, etc.)
- 📁 gateways/ - WebSocket gateways for real-time communication
- 📁 prisma/ - Esquema de base de datos y seeds
npm run start:dev- Start the application in development mode with hot-reloading.npm run build- Compile the TypeScript code into JavaScript.npm run typeorm:generate- Generate database migrations based on entity changes.npm run typeorm:migrate- Run pending migrations to update the database schema.npm run typeorm:drop- Drop the database schema (use with caution).npm run seed:fresh- Run seeders to populate the database with initial data.npm run seed- Run seeders without dropping the database.
This project is licensed under the MIT License - see the 📄LICENSE.md file for details.