The object of the app is to create a social network environment to share menu bars. From a list of bars and restaurants that have daily menu service and are around the user, create a ranking and collect the opinions of users. The ownwers can register their businesses, publish their offers and daily menus.
- 404: generic error for access without logging and non-existent pages.
- SignUp: Access for new users. User and owner roles.
- Login: login with signup credentials.
- Log out: end of the session.
- List of restaurants you get the list of daily menu restaurants that exist around the user (max 15" walking).
- Search in list of restaurants filtering of the results to the search of the user.
- Add / remove bookmarks include and remove restaurant from the user's favorite list
- View favorites See list of user favorites
- Add / remove Restaurant: The owner will register the restaurant (s) that he owns.
- Add daily menu: Daily incorporation of the menu, using form or image.
- Modify restaurant information: The owner can modify the data and images of the restaurant.
- geolocation and maps
- promotions carousel
- search for locations in the list
- Signup and login with social networks
- Add restaurants with validation from the system administrator or owner.
- include images of places and dishes.
- rate the place.
- rate the menu.
- rate the price.
- rate cleaning.
- rate the service.
- count visits to restaurant
- OCR of the menu image
- Custom promotions to users who have the restaurant in favorites.
- Mark restaurant created by users as your own.
/
- HomePageComponent
- public
- just promotional copy
/auth/signup
- SignupPageComponent
- anon only
- signup form, link to login
- navigate to homepage after signup
/auth/login
- LoginPageComponent
- anon only
- login form, link to signup
- navigate to homepage after login
/restaurants
- RestaurantListPageComponent
- public
- shows all restaurants, links to details
- search restaurants by name
/restaurants/create
- RestaurantCreatePageComponent
- user only
- creates a new restaurant
- navigates to restaurant's detail page after creation
/restaurants/:id
- RestaurantDetailPageComponent
- public
- details of one restaurant
- button to add to favorite
- show star if in favorites already
/profile/me
- ProfilePageComponent
- user only
- my details
- my favorite restaurants
- restaurants created by me
**
- NotFoundPageComponent
- Restaurant Card component
- Input: restaurant: any
- Output: favorite(restaurantId: string, on: boolean)
- Map component
- Input: [restaurant]
- Output: selectedRestaurant(restaurantId:string)
- Search component
- Output: change(terms: string)
- Auth Service
- auth.login(user)
- auth.signup(user)
- auth.logout()
- auth.me()
- auth.getUser() // synchronous
- Restaurant Service
- restaurant.list()
- restaurant.search(terms)
- restaurant.create(data)
- restaurant.detail(id)
- restaurant.addFavorite(id)
- restaurant.removeFavorite(id)
- Owner Service
- restaurant.addDailyMenu(id, date)
User model
{
username: { type: String, trim: true, required: true },
email: {
type: String,
unique: true,
},
password: String,
favorites: [{ type: ObjectId, ref: 'Place' }],
comments: [{ type: ObjectId, ref: 'Comment' }],
following: [{ type: ObjectId, ref: 'User' }],
}
Location model
{
id: Number,
name: String,
address: String,
category: String,
location: String,
lat: Double,
lng: Double,
coordinates: {
type: 'Point',
coordinates: [{
longitude: Double,
latitude: Double,
}],
},
numReviews: Number,
polarity: Number,
reviews: String,
details: String,
rev: String,
det: String,
}
Place model
{
id: Number,
name: String,
address: String,
category: String,
location: String,
lat: Double,
lng: Double,
coordinates: {
type: 'Point',
coordinates: [{
longitude: Double,
latitude: Double,
}],
},
services: {
en: [String],
it: [String],
fr: [String],
nl: [String],
de: [String],
es: [String],
},
phone_number: String,
international_phone_number: String,
website: String,
icon: String,
description: {
en: String,
it: String,
fr: String,
nl: String,
de: String,
es: String,
unidentified: String,
},
external_urls: {
Foursquare: String,
Facebook: String,
GooglePlaces: String,
Booking: String,
},
statistics: {
Foursquare: {
checkinsCount: Number,
usersCount: Number,
tipCount: Number,
price: Number,
likes: Number,
hereNow: {
count: Number,
summary: Number,
groups: [Number],
},
},
Facebook: {
checkins: Number,
talking_about_count: Number,
were_here_count: Number,
fan_count: Number,
},
},
numReviews: Number,
reviews: [String],
polarity: Number,
}
Comment model
{
id: Number,
restaurant: { type: ObjectId, ref: 'Place' },
postedBy: { type: ObjectId, ref: 'User' },
source: String,
text: String,
language: String,
polarity: Number,
rating: { type: Number, default: 0 },
likes: { type: Number, default: 0 },
dislikes: { type: Number, default: 0 },
shared: { type: Number, default: 0 },
timeStamp: { type: Date, default: Date.now },
wordsCount: Number,
}
Menu model
{
id: Number,
restaurant: { type: ObjectId, ref: 'Place' },
postedBy: { type: ObjectId, ref: 'User' },
menu: String,
language: String,
rating: { type: Number, default: 0 },
likes: { type: Number, default: 0 },
dislikes: { type: Number, default: 0 },
shared: { type: Number, default: 0 },
timeStamp: { type: Date, default: Date.now },
}
- GET /auth/me
- 404 if no user in session
- 200 with user object
- POST /auth/signup
- 401 if user logged in
- body:
- username
- password
- validation
- fields not empty (422)
- user exists (409)
- create user with encrypted password
- store user in session
- 200 with user object
- POST /auth/login
- 401 if user logged in
- body:
- username
- password
- validation
- fields not empty (422)
- user not exists (404)
- passdword not match (404)
- store user in session
- 200 with user object
- POST /auth/logout
- body: (empty)
- 204
- POST /user/me/favorite
- body:
- restaurantId
- validation
- id is valid (404)
- id exists (404)
- add to favorites if not there yet
- updates user in session
- body:
- DELETE /user/me/favorite/:restaurantId
- validation
- id is valid (404)
- id not exists (404)
- body: (empty - the user is already stored in the session)
- remove from favorites
- updates user in session
- validation
- GET /restaurant?terms=foo
- use search criteria if terms provided
- 200 with array of restaurants
- POST /restaurant
- body:
- restaurant fields
- validation
- fields not empty
- create restaurant
- 200 with restaurant object
- body:
- PUT /user/me/comment/:restaurantId
- validation
- id is valid (404)
- id not exists (404)
- body: (empty - the user is already stored in the session)
- DELETE /user/me/comment/:restaurantId