Team - VenueForge - Phase1 MVP#76
Open
akhintheruvath wants to merge 116 commits into
Open
Conversation
getting started - basic frontend setup
tailwind css setup
initial backend setup
feat(backend): add public venue & category read APIs
Navbar basic with Location
File Re-Organisied
Added Venue Owner, Admin Pages
Established API Data To Load On Frontend
…into phase1mvp-akhin
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.
delete draft venue
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Phase Category
Tech Stack (For Phase 1 MVP Submissions)
Checklist:
AI Disclosure