Skip to content

Feat/mern mvp vivek#65

Open
viv756 wants to merge 28 commits into
WeCode-Community-Dev:mainfrom
viv756:feat/mern-mvp-vivek
Open

Feat/mern mvp vivek#65
viv756 wants to merge 28 commits into
WeCode-Community-Dev:mainfrom
viv756:feat/mern-mvp-vivek

Conversation

@viv756

@viv756 viv756 commented Jun 27, 2026

Copy link
Copy Markdown

Description

Phase Category

  • Phase 1: MVP Submission (Base Foundation)
  • Phase 2/3: Feature Implementation or Modularization
  • Phase 4: Scalability Optimization
  • General (Documentation, Bugfix, Chore, etc.)

Tech Stack (For Phase 1 MVP Submissions)

(Example: Frontend: React, Backend: Node.js, Database: MongoDB)

  • Frontend: React
  • Backend: Node.js
  • Database: MongoDB

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature / Module (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update

Checklist:

  • I have read the Contribution Guidelines.
  • My code follows the community spirit and standards of the WeCode community.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • My changes generate no new warnings or errors.

AI Disclosure

  • I did NOT use AI tools to generate this code.
  • I used AI tools (e.g., Copilot, ChatGPT, Claude) to help write this code, and I have fully reviewed, tested, and understand the output.

Screenshots / Screen Recording (if applicable)

viv756 added 28 commits June 20, 2026 10:09
- Add Vite + React + TS client with Tailwind v4 and shadcn path aliases
- Add Express + TypeScript server with MongoDB, nodemon, ts-node
- Configure tsconfig for CommonJS output and add .gitignore
Introduce a typed error-handling layer for the Express API:

- AppError base class with HTTP status and app-level error codes,
  plus NotFound/BadRequest/Unauthorized/Forbidden/InternalServer
  and HttpException subclasses
- HTTP_STATUS config and ErrorCodeEnum for consistent status/error codes
- errorHandler middleware to format error responses
- asyncHandler middleware to forward async route errors
- wire errorHandler into the app in index.ts
- set exactOptionalPropertyTypes to false in tsconfig
- getEnv util to read env vars with defaults and throw on missing required values
- Env config object centralizing PORT, NODE_ENV, MONGO_URI, BASE_PATH,
  FRONTEND_ORIGIN, and JWT settings
- use Env.PORT/NODE_ENV in startup log
- add cookie-parser, cors, dotenv (and @types) dependencies
- load env via dotenv/config
- wire json, urlencoded, cookieParser, and cors (FRONTEND_ORIGIN, credentials)
- add GET / health route using asyncHandler
- bind server to Env.PORT
- User model with bcrypt password hashing hook, comparePassword/omitPassword,
  and role enum (OWNER/ADMIN/CUSTOMER)
- Venue model with hourly pricing and operating hours (minutes from midnight)
- Reservation and Booking models with startTime/endTime slots for
  time-based booking and overlap checks
- Payment model with provider/status enums; required amount, booking, customer
- Review model with 1-5 rating
- domain enums for booking, reservation, payment statuses
- bcrypt util for hashing and comparison
- register and login controllers/services with bcrypt and JWT
- signin sets an httpOnly accessToken cookie
- role-aware signup (CUSTOMER/OWNER whitelist, ADMIN blocked)
- jwt util to sign and verify access tokens
- connectDatabase to connect Mongoose via MONGO_URI
- call connectDatabase on server startup
- add VenueTypeEnum (banquet hall, conference room, wedding lawn,
  auditorium, rooftop, party hall)
- type venueType as VenueTypeEnumType in the model and schema enum
- type CreateVenueParams.venueType against the enum in venue service
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.

1 participant