Files
pos-system/services/_template
Ho Ngoc Hai 526f376c5f Enhance configuration and authentication features across services
- Updated `next.config.js` in both web-admin and web-client to enable React strict mode, set output to standalone, and expose environment variables for API URL.
- Enhanced `auth-sdk` with detailed comments for JWT verification, decoding, and token management functions.
- Improved `http-client` with comprehensive documentation for HTTP client configuration and methods.
- Expanded `logger` functionality with detailed configuration options and logging formats.
- Enhanced `tracing` setup with detailed comments for distributed tracing configuration.
- Updated `types` definitions for authentication and user data transfer objects with comprehensive comments.
- Improved `auth-service` with detailed comments in controllers, services, and middlewares for better clarity and maintainability.
- Added health check endpoints in `health.controller.ts` for service monitoring.
- Enhanced error handling and logging throughout the application for better debugging and user feedback.
2025-12-27 01:37:59 +07:00
..
2025-12-27 01:31:10 +07:00
2025-12-27 01:31:10 +07:00
2025-12-27 01:31:10 +07:00
2025-12-27 01:31:10 +07:00

Service Template

Template for creating new microservices in the monorepo.

Usage

  1. Copy this template to create a new service:

    cp -r services/_template services/new-service
    
  2. Update package.json:

    • Change name to @goodgo/new-service
    • Update description
  3. Update .env.example:

    • Set appropriate PORT
    • Set SERVICE_NAME
    • Configure database URL
  4. Implement your features:

    • Add modules in src/modules/
    • Update routes in src/routes/index.ts
    • Add Prisma schema if needed
  5. Update Dockerfile:

    • Change EXPOSE port if different
  6. Remove this README and create your own

Structure

  • src/modules/ - Feature modules (controller, service, dto, module)
  • src/config/ - Configuration files
  • src/middlewares/ - Express middlewares
  • src/routes/ - Route definitions
  • prisma/ - Database schema and migrations
  • tests/ - Unit and integration tests