Skip to content

Team - VenueForge - Phase1 MVP#76

Open
akhintheruvath wants to merge 116 commits into
WeCode-Community-Dev:mainfrom
akhintheruvath:main
Open

Team - VenueForge - Phase1 MVP#76
akhintheruvath wants to merge 116 commits into
WeCode-Community-Dev:mainfrom
akhintheruvath:main

Conversation

@akhintheruvath

@akhintheruvath akhintheruvath commented Jun 29, 2026

Copy link
Copy Markdown

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)

  • Frontend: ReactJs, TailwindCSS
  • Backend: NodeJs with express
  • Database: MongoDB

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.

akhintheruvath and others added 30 commits May 30, 2026 14:15
getting started - basic frontend setup
feat(backend): add public venue & category read APIs
Added Venue Owner, Admin Pages
Established API Data To Load On Frontend
akhintheruvath and others added 29 commits June 16, 2026 01:17
Add POST /auth/signin endpoint accepting venue owner and admin
credentials, with uniform "invalid credentials" responses to avoid
leaking account existence or auth method. Validate sign-in input and
wire the owner sign-in card to call the API, adopt the returned session
via loginWithSession, and navigate to the dashboard. Add admin JWT
expiry (2h) to config.
feat: add email/password sign-in for venue owners
Sign-up now returns the user alongside the token, matching the sign-in
response shape. The frontend adopts the session directly via
loginWithSession instead of loginWithToken, which fetched /auth/me to
load the user. Removed the now-unused loginWithToken from AuthProvider.
Venue owners now have a dedicated email/password flow on the
/venue-owner page, making the venue-owner Google path redundant.

- SigninModal: drop the customer/venueOwner tabs; now a single
  customer Google login
- AuthProvider: loginWithGoogle no longer takes/sends a role
- googleLogin controller: ignore any role in the body, always
  assign role=customer, and reject non-customer accounts
  with a 409
- remove the now-unused SELF_SIGNUP_ROLES constant and ROLE_TAB_LABEL
Standardize terminology so the app consistently says "login" instead of
"sign in" and "login" mixed. Touches code identifiers, the API route,
user-facing text, and comments; the parallel sign-up flow is
intentionally left unchanged.

- API: POST /auth/signin -> POST /auth/login
- Backend: rename signIn controller -> login, signInDataValidations ->
  loginDataValidations, SIGN_IN_ROLES -> LOGIN_ROLES
- Frontend: rename SigninModal -> LoginModal, OwnerSignInCard ->
  OwnerLoginCard, and AuthContext keys openSignin/closeSignin/signinOpen
  -> openLogin/closeLogin/loginOpen
- UI: "Sign In" -> "Login"; Google button now uses text="continue_with"
  ("Login with Google" isn't an option Google's widget allows)
…or consistency

Standardize all venue-owner naming on the "venueOwner"/"VenueOwner" prefix
so files, folders, identifiers, and prose are consistent and unambiguous.

Backend:
- Rename controllers: createOwnerVenue -> venueOwnerCreateVenue, and likewise
  for list/submit/update/delete; update exported fn names and route wiring
- Rename Venue schema field `owner` -> `venueOwner`; update the list query
  filter and OWNER_VENUE_PROJECTION -> VENUE_OWNER_VENUE_PROJECTION
- Reword "owner" -> "venue owner" in comments

Frontend:
- Rename landing components Owner* -> VenueOwner* (LoginCard, SignUpCard,
  BenefitCard, LandingInfo) and ownerBenefits -> venueOwnerBenefits
  (OWNER_BENEFITS -> VENUE_OWNER_BENEFITS); update imports and usages
- Rename folder pages/OwnerPage -> pages/VenueOwnerPage; fix App.jsx imports
- Sidebar label "Owner" -> "Venue Owner"
Completed The Full UI/UX Design For Owner Page
Replace the separate Add Venue form with a create-draft-then-edit flow:
"Add Venue" now creates an empty DRAFT and redirects to the edit page,
which autosaves field changes (debounced ~2s) with a saving/saved
indicator and a "Continue Editing Later" action.

Backend:
- Implement venueOwnerCreateVenue (empty DRAFT) and venueOwnerUpdateVenue
  (partial autosave, validators skipped — submit is the validation gate)
- Add GET /venueOwner/venues/:id (venueOwnerGetVenueById) for fetching an
  owner's own venue in any status
- Replace VENUE_OWNER_VENUE_PROJECTION with OWNER_HIDDEN_FIELDS exclusion

Frontend:
- Remove AddVenuePage; VenueForm handles both create and edit
- Rename owner service fns (getOwnerVenues -> getVenueOwnerVenues, etc.)
  and add createDraftVenue / getVenueOwnerVenueById
Implement venueOwnerSubmitVenue: verify ownership, gate on
SUBMITTABLE_STATUSES, then check all REQUIRED_VENUE_FIELDS are filled
before moving DRAFT -> PENDING or EDIT_DRAFT -> CHANGES_PENDING. Returns
400 with missingFields when the draft is incomplete.

Add REQUIRED_VENUE_FIELDS and missingRequiredVenueFields() to shared.js.
Preserve the structured error body on the API client so callers can read
response data, and surface missingFields inline in VenueForm by flagging
each input and focusing the first. Show a confirmation toast on submit.
venue add, edit & submit flow - venue owner page
Admin Page : Sidebar and Venue approval page added
Replace the 501 stub in venueOwnerDeleteVenue with a real hard delete
gated to DRAFT and EDIT_DRAFT statuses. Add a DELETABLE_STATUSES constant
and a shared statusNotAllowedMessage() helper so the guard and its 400
message share one source of truth across submit/delete/edit actions.

Frontend: hide the delete button unless the venue is DRAFT/EDIT_DRAFT,
tailor the confirm dialog and success toast for discard-edit vs delete,
and drop the alert() now that the api client surfaces errors as toasts.
…lers

Replace the hardcoded status-gate 400 messages in venueOwnerSubmitVenue
and venueOwnerUpdateVenue with statusNotAllowedMessage(), so the allowed
status list and its error text stay in sync with the guards.
Editing a live APPROVED venue never mutates it in place. Instead it works
on an EDIT_DRAFT copy (editOf -> original), which is submitted as
CHANGES_PENDING for admin re-approval.

Backend:
- Add POST /venueOwner/getVenueForEdit/:id — idempotently creates/resumes the
  EDIT_DRAFT copy, 409s when a CHANGES_PENDING copy is already in review
- Add buildEditDraftSeed() in shared to seed a copy from the original
- Mark APPROVED venues in the owner list with editStatus so the UI can
  relabel/guard the Edit button without a per-row request

Frontend:
- getVenueForEdit() service call
- EditVenuePage resolves the editable copy for APPROVED venues, autosaves and
  submits against the copy id while keeping the original id in the URL, and
  shows a blocked state on 409
- VenueTable shows "Resume edit" for in-progress copies and disables Edit with
  an info tooltip while edits await review
- Replace placeholder admin login with real auth (form + /auth/login)
- Guard admin routes with RequireAuth (role: admin)
- Wire up admin logout via auth context
- Add seedAdmin script to create an admin user
venue owner side and admin side updates
@akhintheruvath akhintheruvath changed the title Team - VenueForge Team - VenueForge - Phase1 MVP Jun 29, 2026
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.

2 participants