Skip to content

Comments

feat: user module, mail service, Redis caching, wallet generation, exception filter, trust section, governance events#169

Merged
Devsol-01 merged 3 commits intoDevsol-01:mainfrom
yinkscss:feat/user-module-mail-redis
Feb 23, 2026
Merged

feat: user module, mail service, Redis caching, wallet generation, exception filter, trust section, governance events#169
Devsol-01 merged 3 commits intoDevsol-01:mainfrom
yinkscss:feat/user-module-mail-redis

Conversation

@yinkscss
Copy link

@yinkscss yinkscss commented Feb 23, 2026

Summary

This PR implements 7 issues across the backend, frontend, and smart contracts:

Backend

  • User Module (Build the User Module (CRUD) #132): UserModule, UserController, and UserService with CRUD endpoints (GET /users/me, GET /users/:id, PATCH /users/me, DELETE /users/me). All routes protected by JwtAuthGuard. Password hashes excluded from all responses via Prisma select. Includes UpdateUserDto with class-validator decorators.

  • Email Service (Integrate Email Sending Service #133): MailModule configured with @nestjs-modules/mailer using async SMTP transport. Includes MailService.sendWelcomeEmail() and a Handlebars welcome email template.

  • Redis Caching (Implement Redis Caching #134): RedisCacheModule using @nestjs/cache-manager with cache-manager-redis-yet. Globally configured with Redis URL fallback to in-memory. CacheInterceptor applied to health endpoint.

  • Stellar Wallet Generation (Endpoint for Stellar Wallet Generation #137): POST /blockchain/wallets/generate endpoint with generateKeypair() method in StellarService using Keypair.random() from @stellar/stellar-sdk.

  • Standardize Exception Filter (Standardize Global Exception Filter #124): Updated AllExceptionsFilter to return { success, statusCode, message, timestamp, path }. Validation arrays are joined. Stack traces suppressed from client responses.

Frontend

  • Why Trust Nestera? (Build the "Why Trust Nestera?" Section #93): New WhyTrust.tsx component with 4 trust items (Transparent, Non-Custodial, Low Fees, No Penalty), teal checkmark icons, dark theme cards. Integrated into LandingPage between HowItWorks and SavingsProducts. Also fixed duplicate imports in LandingPage.tsx.

Smart Contracts

  • Governance Event Logging (## Governance Event Logging #164): New governance_events module with structured event types (ProposalCreated, VoteCast, ProposalQueued, ProposalExecuted, ProposalCanceled) and emit helpers. Replaced all inline env.events().publish() calls in governance.rs with structured emitters. Indexed by topic for frontend consumption.

Supporting Changes

  • Prisma ORM setup with User model (Prisma v7 config)
  • AuthModule with Passport JWT strategy and JwtAuthGuard
  • BlockchainController added to BlockchainModule
  • Configuration and env validation updates for mail variables
  • Merge conflict resolution with upstream throttler additions

Test Plan

  • npx prisma migrate dev with PostgreSQL to verify schema
  • GET /api/users/me returns 401 without JWT
  • GET /api/users/me returns user data (no password) with valid JWT
  • PATCH /api/users/me updates name/bio
  • DELETE /api/users/me removes user
  • Configure SMTP and verify welcome email sends
  • GET /api/health caches with Redis (or in-memory fallback)
  • POST /api/blockchain/wallets/generate returns publicKey and secretKey
  • Error responses match standardized format with success: false
  • "Why Trust Nestera?" renders with 4 items and teal icons
  • cargo test passes for governance event changes
  • Frontend builds without errors

Closes #132, closes #133, closes #134, closes #137, closes #124, closes #93, closes #164

- Set up Prisma ORM with User model and PostgreSQL datasource
- Add UserModule with CRUD endpoints (GET /users/me, GET /users/:id,
  PATCH /users/me, DELETE /users/me) protected by JWT auth guard
- Add AuthModule with Passport JWT strategy for route protection
- Add MailModule with SMTP transport and Handlebars templates,
  including sendWelcomeEmail service method
- Add RedisCacheModule with global cache configuration and apply
  CacheInterceptor to the health endpoint as proof of concept
- Update configuration and env validation for mail variables

Closes Devsol-01#132, closes Devsol-01#133, closes Devsol-01#134
@vercel
Copy link

vercel bot commented Feb 23, 2026

Someone is attempting to deploy a commit to the devsol-01's projects Team on Vercel.

A member of the Team first needs to authorize it.

yinkscss added 2 commits February 23, 2026 13:37
…-redis

# Conflicts:
#	backend/package-lock.json
#	backend/package.json
#	backend/src/app.module.ts
#	backend/src/config/configuration.ts
#	backend/src/config/env.validation.ts
…nance events

- Add POST /blockchain/wallets/generate endpoint with Stellar keypair
  generation via StellarService (Devsol-01#137)
- Standardize AllExceptionsFilter to return { success, statusCode,
  message, timestamp, path } and suppress stack traces in production (Devsol-01#124)
- Add "Why Trust Nestera?" section component with teal checkmark icons
  and 4 trust points, integrated into LandingPage (Devsol-01#93)
- Add structured governance event logging with ProposalCreated, VoteCast,
  ProposalQueued, ProposalExecuted, and ProposalCanceled event types,
  replacing inline publish calls (Devsol-01#164)
- Fix broken duplicate imports in LandingPage.tsx

Closes Devsol-01#137, closes Devsol-01#124, closes Devsol-01#93, closes Devsol-01#164
@yinkscss yinkscss changed the title feat: add user CRUD module, email service, and Redis caching feat: user module, mail service, Redis caching, wallet generation, exception filter, trust section, governance events Feb 23, 2026
@yinkscss yinkscss force-pushed the feat/user-module-mail-redis branch from 6c0e483 to 312d1a7 Compare February 23, 2026 12:47
@Devsol-01 Devsol-01 merged commit f288d40 into Devsol-01:main Feb 23, 2026
0 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants