03: PixE Routes and Taxonomy - team-photo-app/photo-app GitHub Wiki
Back End
Routes
/sign-in
front ends sends user info, user authenticated and backend returns list of events (/get-events)
/sign-up
front ends sends new user info, backend saves new user to DB, responds with "You're signed up for PixE! Sign-in to get started."
/create-event
front ends sends the schema info below, backend sends back updated user.myevents
/get-events
front end sends userId, events, and myEvents, backend sends back a list of all event details associated with each eventId associated with the user
/post-pictures
front end sends picture data, back end saves image to S3; and saves pictureId to eventID to update event data with new pictureId
/get-pictures
front end sends eventId, back end looks up eventId, grabs all pictures from S3 and returns all of them to front end (or front end grabs all the pics from s3 associated with the eventId
Schemas
User
- userId
- userName
- password
- events - array of eventIds (from event schema below - user is guest)
- myEvents - array of eventIds (from event schema below - user is owner)
- token (optional for auth)
Event
- eventId
- eventTitle
- eventDesc
- eventSplashImg (stretch)
- eventOwnerId - only one user is owner
- eventGuestIds - array of userIds of guests, not owner
- pictureIds - array of eventPictureIds (from picture schema below - associated with event)
- qrCode (stretch)
Picture
- userId - associated with user that saves the picture to mongo
- eventId - associated with the event the user saves the picture to in mongo
- pictureId - created on front end with UUID
- eventPictureId - eventId+pictureId - saved in mongo, also saved with picture to s3 (as file name)
- pictureData - gets saved to s3 with eventPictureId
- description
- tags - array of tags
Front End
Components
Landing Page
- SignIn
- SignUp
Events Page
- JoinEvent
- CreateEvent
- EventList
Gallery Page
- Gallery
Elements
- Sidebar
Some Front End Naming Convention Examples
components: camera-screen.component.js toolbar.component.js
pages or views: camera.page.js or camera.view.js