uelb / fancy-coffee-table Goto Github PK
View Code? Open in Web Editor NEWSimple chat app based on geolocation
Simple chat app based on geolocation
We should stick to a REST API controller architecture and not think too much about the client side for the moment. The registrations and sessions controller will be managed by a third party library so is not explained here.
/users/:id/users
Users around the user whose id is :id and filtered by his preferences and maybe the evaluation scores/users/:user_id/rooms
Displayed rooms of the user whose id is :user_id/users/:user_id/rooms
Create or join a room by looking for an available user around the user whose id is :user_idrooms/:id
Hide the room whose id is :id for the current userrooms/:id
Display the profile of the current user for the room :idrooms/:room_id/messages
Get all the messages of the room :room_idmessages/:id
Delete the message :idrooms/:room_id/messages
Create a message for the current user in the room :room_idmessages/:id
Update the message :id body/users/:user_id/evaluations/average
Get the average evaluation of the user :user_id/users/:user_id/evaluations
Get all the evaluations of the user :user_id/users/:user_id/evaluations
Create an evaluation for the user :user_id/evaluations/:id
Change the score of an evaluationLet's remind that in Rails, there are automatically an id (primary key), a created_at and an updated_at attributes, we will therefore not write those attributes below.
email:string
password:string
firstname:string
lastname:string
latitude:float
longitude:float
gender:boolean
gender_preference:boolean
min_age_preference:integer
max_age_preference:integer
name
firstname + lastnamearound(kms)
Users around a specific user in a circle of kms radiusaverage_score
Simple average of the scores the evaluations the user receivedaround(latitude,longitude)
All users around a certain map positionhas_many :rooms
has_many :pictures
has_many :sent_messages, foreign_key: :sender_id
has_many :received_messages, foreign_key :recipient_id
has_many :send_evaluations, foreign_key: :reviewer_id
has_many :received_evaluations, foreign_key: :reviewed_user_id
:email => [:presence, :format]
:password => [:presence]
firstname => [:presence]
lastname => [:presence]
latitude:float
longitude:float
first_user_id:integer
second_user_id:integer
displayed_for_first_user:boolean (default:true)
displayed_for_second_user:boolean (default:true)
first_user_profile_displayed:boolean (default:false)
second_user_profile_displayed:boolean (default:false)
is_active?
Whether one of the users have chosen not to display the roombelongs_to :first_user
belongs_to :second_user
has_many :messages
:latitude => :presence
:longitude => :presence
:first_user => :presence
:second_user => :presence
:displayed_for_first_user => :presence
:displayed_for_second_user => :presence
:first_user_profile_displayed => :presence
:second_user_profile_displayed => :presence
body:text (null: false)
sender_id:integer (null:false)
recipient_id:integer (null:false)
belongs_to :sender, class_name: 'User'
belongs_to :recipient, class_name: 'User'
belongs_to :room
I think we should let a user evaluate another one to exclude users that are polluting the app
reviewer_id:integer (null: false)
reviewed_user_id:integer (null: false)
score:tinyint (null:false)
belongs_to :reviewer, class_name: 'User'
belongs_to :reviewed_user, class_name: 'User'
:reviewer => :presence
:reviewed_user => :presence
:score => [:presence, min: 0, max: 5]
Form with email, password
Form with email, password
Form with email
Form with email, password, firstname, lastname, preferences, etc... (Cannot change email without password)
Basic Actions and nav :
Basic Message chat
Actions :
This will probably be the most difficult part, as we are not designers
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.