Skip to content

Add descriptive English README#7

Open
Copilot wants to merge 2 commits intomainfrom
copilot/add-readme-file
Open

Add descriptive English README#7
Copilot wants to merge 2 commits intomainfrom
copilot/add-readme-file

Conversation

Copy link

Copilot AI commented Feb 20, 2026

README_EN.md contained the stock NestJS starter boilerplate — no project-specific content at all.

Replaced with a full English README covering:

  • Overview – purpose, key features (auth, RBAC, registrations, multi-currency payments, email, WhatsApp, rate limiting)
  • Tech stack – NestJS, Prisma, PostgreSQL, JWT, Bcrypt, Nodemailer, Jest, Docker with versions
  • Setup – automated (./init.sh) and manual step-by-step install
  • Configuration – required env vars with examples; links to ENVIRONMENT_VARIABLES.md for full reference
  • API reference – endpoint tables for /auth, /course, /registration, /payment with HTTP method and auth requirements
  • Testing – all test commands and current coverage notes
  • Operations – Docker, Prisma commands, deployment (PM2), troubleshooting common errors

The French README.md is unchanged.

Original prompt

This section details on the original issue you should resolve

<issue_title>No readme file</issue_title>
<issue_description>Write a descriptive readme based on the project state
</issue_description>

Comments on the Issue (you are @copilot in this section)


🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

… README

Co-authored-by: Romaric-py <141680466+Romaric-py@users.noreply.github.com>
Copilot AI changed the title [WIP] Add descriptive readme based on project state Add descriptive English README Feb 20, 2026
Copilot AI requested a review from Romaric-py February 20, 2026 18:21
@Romaric-py Romaric-py marked this pull request as ready for review February 20, 2026 18:26
Copilot AI review requested due to automatic review settings February 20, 2026 18:26
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR replaces the generic NestJS boilerplate README_EN.md with a comprehensive, project-specific English README that thoroughly documents the Register Manager API application. The French README.md remains unchanged.

Changes:

  • Replaced 98 lines of NestJS boilerplate with 428 lines of detailed project documentation
  • Added complete feature overview, architecture documentation, and API endpoint reference
  • Included automated (init.sh) and manual setup instructions with environment configuration examples
  • Documented testing, deployment, troubleshooting, and operational procedures

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

- 📝 **Registration system** with status tracking
- 💳 **Payment processing** with multi-currency support (USD, EUR, XOF) via FedaPay
- 📧 **Email service** for notifications, verification, and password resets
- 🔄 **WhatsApp integration** for communications
Copy link

Copilot AI Feb 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The README claims "🔄 WhatsApp integration for communications" as a key feature (line 25) and lists it in the module structure (line 58), but the actual WhatsApp service file at src/whatsapp/whatsapp.service.ts is empty (0 lines). This feature appears to be a placeholder or planned feature rather than an implemented one. The README should clarify that this is a planned/stub feature or remove it from the list of current features.

Suggested change
- 🔄 **WhatsApp integration** for communications
- 🔄 **Planned WhatsApp integration** for communications (coming soon)

Copilot uses AI. Check for mistakes.
Comment on lines +365 to +366
# With PM2 (recommended)
pm2 start dist/main.js --name register-manager-api
Copy link

Copilot AI Feb 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The deployment section recommends using PM2 with the command "pm2 start dist/main.js --name register-manager-api" (line 366). However, the package.json build configuration doesn't specify the output format. NestJS typically builds to CommonJS by default and the entry point would be at "dist/main.js" or "dist/src/main.js" depending on configuration. Consider verifying this path works correctly or providing the actual path based on the build output. You may also want to mention installing PM2 first with "npm install -g pm2".

Suggested change
# With PM2 (recommended)
pm2 start dist/main.js --name register-manager-api
# With PM2 (recommended)
# Install PM2 globally (if not already installed)
npm install -g pm2
# Start with PM2
# Use the correct build output path for your setup:
# - dist/main.js (common NestJS output)
# - dist/src/main.js (if your build nests files under src/)
pm2 start dist/main.js --name register-manager-api
# pm2 start dist/src/main.js --name register-manager-api

Copilot uses AI. Check for mistakes.
# Create database and update DATABASE_URL in .env
createdb mydb
```

Copy link

Copilot AI Feb 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the manual setup instructions, the command "createdb mydb" (line 171) is provided for creating the database. However, the example DATABASE_URL shown in the Configuration section (line 127) references "mydb" as the database name, but the docker-compose.yml file creates a database named "mydb" (line 7) with user "user" and password "password". The instructions are consistent and correct. However, it would be helpful to note that these credentials match the Docker setup for convenience, and users with local PostgreSQL should adjust them accordingly.

Suggested change
> Note: The example `DATABASE_URL` and the credentials used in `docker-compose.yml` (database `mydb`, user `user`, password `password`) are aligned for convenience. If you use a different local PostgreSQL setup, create the database/user as needed and update `DATABASE_URL` in your `.env` file accordingly.

Copilot uses AI. Check for mistakes.
| Method | Endpoint | Description | Auth |
|--------|-------------------------------|------------------------------|------|
| POST | `/payment/generate-link` | Generate a payment link | JWT |
| GET | `/payment/available-amounts` | Get available payment amounts| JWT |
Copy link

Copilot AI Feb 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The /payment/available-amounts endpoint is documented as a GET request, but in the actual implementation at src/payment/payment.controller.ts line 30, it uses the @Get decorator and expects a @Body parameter, which is unusual for GET requests. GET requests typically use query parameters, not request bodies. This appears to be a potential API design issue in the code rather than just documentation, but the documentation should accurately reflect what's implemented.

Suggested change
| GET | `/payment/available-amounts` | Get available payment amounts| JWT |
| POST | `/payment/available-amounts` | Get available payment amounts| JWT |

Copilot uses AI. Check for mistakes.
Comment on lines +119 to +147
## 🔧 Configuration

### Environment Variables

Copy `.env.example` to `.env` and configure the values:

```bash
# Database
DATABASE_URL=postgresql://user:password@localhost:5434/mydb

# JWT
JWT_SECRET=your-super-secret-jwt-key
JWT_ACCESS_TOKEN_EXPIRY=1800000 # 30 minutes (ms)
JWT_REFRESH_TOKEN_EXPIRY=604800000 # 7 days (ms)

# Email (SMTP)
MAIL_HOST=smtp.gmail.com
MAIL_USER=your-email@gmail.com
MAIL_PASSWORD=your-app-password

# Frontend URL (used in email links)
FRONTEND_URL=http://localhost:3001

# Super Admin credentials (used during seeding)
SUPER_ADMIN_EMAIL=admin@registerManager.com
SUPER_ADMIN_PASSWORD=AdminPassword123!
```

📖 **Full documentation**: See [ENVIRONMENT_VARIABLES.md](./ENVIRONMENT_VARIABLES.md)
Copy link

Copilot AI Feb 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The README states that FedaPay integration is included for "multi-currency support (USD, EUR, XOF) via FedaPay" (line 23), but the required FedaPay environment variables (FEDAPAY_API_KEY, FEDAPAY_API_URL, FEDAPAY_CURRENCY, FEDAPAY_COUNTRY, FEDAPAY_CALLBACK) are not documented in the Configuration section or mentioned in the .env.example file. These are critical for payment processing. The configuration section should include these required variables or at least reference where to find them.

Copilot uses AI. Check for mistakes.
Comment on lines +33 to +42
| Technology | Version | Purpose |
|----------------|----------|--------------------------------|
| **NestJS** | ^11.0.1 | Node.js TypeScript framework |
| **Prisma** | ^6.15.0 | Database ORM |
| **PostgreSQL** | 15 | Relational database |
| **JWT** | ^11.0.0 | Token-based authentication |
| **Bcrypt** | ^6.0.0 | Password hashing |
| **Nodemailer** | ^7.0.6 | Email delivery service |
| **Jest** | ^29.7.0 | Testing framework |
| **Docker** | - | Database containerization |
Copy link

Copilot AI Feb 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the Tech Stack table, the Nodemailer version is listed as "^7.0.6". However, checking the package.json dependencies (line 44), the actual version is "^7.0.6" which is correct. But "@nestjs-modules/mailer" (version "^2.0.2" in package.json line 24) is not mentioned in the tech stack table, even though it's the primary email service used in the application. Consider adding this to the table or clarifying that Nodemailer is used indirectly via the NestJS mailer module.

Suggested change
| Technology | Version | Purpose |
|----------------|----------|--------------------------------|
| **NestJS** | ^11.0.1 | Node.js TypeScript framework |
| **Prisma** | ^6.15.0 | Database ORM |
| **PostgreSQL** | 15 | Relational database |
| **JWT** | ^11.0.0 | Token-based authentication |
| **Bcrypt** | ^6.0.0 | Password hashing |
| **Nodemailer** | ^7.0.6 | Email delivery service |
| **Jest** | ^29.7.0 | Testing framework |
| **Docker** | - | Database containerization |
| Technology | Version | Purpose |
|-------------------|----------|-------------------------------------------------|
| **NestJS** | ^11.0.1 | Node.js TypeScript framework |
| **Prisma** | ^6.15.0 | Database ORM |
| **PostgreSQL** | 15 | Relational database |
| **JWT** | ^11.0.0 | Token-based authentication |
| **Bcrypt** | ^6.0.0 | Password hashing |
| **NestJS Mailer** | ^2.0.2 | Email service module (built on Nodemailer) |
| **Nodemailer** | ^7.0.6 | Underlying email transport (used via NestJS Mailer) |
| **Jest** | ^29.7.0 | Testing framework |
| **Docker** | - | Database containerization |

Copilot uses AI. Check for mistakes.
Comment on lines +46 to +60
```
src/
├── auth/ # Authentication module
│ ├── dto/ # Data transfer objects
│ ├── guards/ # Security guards
│ └── services/ # Business logic
├── user/ # User management
├── admin/ # Admin operations
├── course/ # Course management
├── registration/ # Registration system
├── payment/ # Payment processing
├── mail/ # Email service
├── whatsapp/ # WhatsApp integration
├── common/ # Shared utilities, filters, interfaces
└── main.ts # Application entry point
Copy link

Copilot AI Feb 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the Module Structure section starting at line 46, the directory tree shows "src/common/" with the description "Shared utilities, filters, interfaces" (line 59). While this is accurate, it would be helpful to be consistent with the detail level - other modules show subdirectories (like auth showing dto/, guards/, services/), but common doesn't show its internal structure. Consider either showing subdirectories for all modules or none, for consistency.

Copilot uses AI. Check for mistakes.
|--------|-------------------------------|------------------------------|------|
| POST | `/payment/generate-link` | Generate a payment link | JWT |
| GET | `/payment/available-amounts` | Get available payment amounts| JWT |
| POST | `/payment/callback` | Payment callback handler | – |
Copy link

Copilot AI Feb 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The /payment/callback endpoint documentation states it has "–" (no auth), but the actual code in src/payment/payment.controller.ts shows it has JWT authentication applied both at the controller level (line 10) and at the method level (line 37). This endpoint requires JWT authentication and should be documented as such.

Suggested change
| POST | `/payment/callback` | Payment callback handler | |
| POST | `/payment/callback` | Payment callback handler | JWT |

Copilot uses AI. Check for mistakes.
Comment on lines +129 to +145
# JWT
JWT_SECRET=your-super-secret-jwt-key
JWT_ACCESS_TOKEN_EXPIRY=1800000 # 30 minutes (ms)
JWT_REFRESH_TOKEN_EXPIRY=604800000 # 7 days (ms)

# Email (SMTP)
MAIL_HOST=smtp.gmail.com
MAIL_USER=your-email@gmail.com
MAIL_PASSWORD=your-app-password

# Frontend URL (used in email links)
FRONTEND_URL=http://localhost:3001

# Super Admin credentials (used during seeding)
SUPER_ADMIN_EMAIL=admin@registerManager.com
SUPER_ADMIN_PASSWORD=AdminPassword123!
```
Copy link

Copilot AI Feb 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The JWT environment variable names in the configuration example don't match the actual variables used in .env.example. The example shows JWT_ACCESS_TOKEN_EXPIRY and JWT_REFRESH_TOKEN_EXPIRY, which match the .env.example file. However, the .env.example file also includes additional JWT-related variables not mentioned here: EMAIL_VERIFICATION_TOKEN_EXPIRY and PASSWORD_RESET_TOKEN_EXPIRY. Consider including these important security-related variables in the configuration section for completeness.

Copilot uses AI. Check for mistakes.
- 📧 **Email service** for notifications, verification, and password resets
- 🔄 **WhatsApp integration** for communications
- 🛡️ **Rate limiting** and advanced security
- 🧪 **Comprehensive tests** with 100% coverage on core modules
Copy link

Copilot AI Feb 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The claim "Comprehensive tests with 100% coverage on core modules" needs clarification. The current coverage section states "Auth module: 100% coverage" but doesn't provide specific coverage metrics. Without running the actual test suite, this claim cannot be verified. Consider being more specific about which modules have 100% coverage or qualify the statement with "as of the latest test run" with a reference to actual coverage reports.

Suggested change
- 🧪 **Comprehensive tests** with 100% coverage on core modules
- 🧪 **Extensive automated tests**, with 100% line coverage on the core auth module as of the latest Jest run (see `coverage/lcov-report`)

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

No readme file

3 participants