Giter VIP home page Giter VIP logo

kiwi-em-client's Introduction

Our idea is to make travelling more accessible for people with special needs. For this reason we create Kiwi-them, which is an app that will connect volunteers with people that needs help during the trip.

Our project is focused in the accesibility and we use ReactJS in the Frontend and NodeJS and Mongoose in the back to developed.

Project team members:

Why is this so awesome?

  • It's the first app focused on connecting volunteers with people with special needs where volunteers can help these, according to their special requests while travelling.
  • Connecting people.
  • Make a better society by helping each other.
  • Social project.

Installation

  1. Clone the Repo.
  2. Open the project directory and run npm install in the command line in the client. npm run start-dev in the server.
  3. Run npm start to execute the project in local.

Server API Github

Devstack

  • Client-side: React, Saas(gsap), Socket.io
  • Server-side: NodeJs, MongoDB, Express

User Stories

  • 404: As an anon/user I can see a 404 page if I try to reach a page that does not exist so that I know it's my fault.
  • 500: As an anon/user I can see a 500 page if the server isn't working.
  • Signup: As a user I want to sign up on the webpage so that I can see my privates screens.
  • Login: As a user I want to be able to log in on the webpage so that I can get back to my account.
  • Logout: As a user I can logout from the platform so no one else can use it.
  • Add Trips: As a user I can add a trips and post them so that other users can see them.
  • Join Trips: As a user I can join to a trip I'm interested in.
  • Edit Trips: As a user I can edit a trip I created.

Backlog

  • Mailing: confirmation by email
  • Ratings: users can rate each other
  • Edit user's Profile

Client / Frontend

Routes

Path Component Permissions Behavior
/auth/signup Signup anon only Signup form, link to login, navigate to '/' after signup
/auth/login Login anon only Login form, link to signup, navigate to '/' after login
/auth/logout n/a anon only Navigate to '/' after logout, expire session
/trip/add TripAdd me user only Create a trip
/trip/edit/:id TripEdit me user only Update a trip
/trip/delete/:id n/a me user only Delete a trip and redirect to '/me'
/me n/a me user only Delete a trip and redirect to '/'
/em n/a em user only Delete a trip and redirect to '/'

Components

  • Navbar

Pages

  • Chat
  • createTrip
  • em (Dashboard for volunteers)
  • me (Dashboard for travelers)
  • landing Page
  • login
  • signup
  • NotFound

Services

  • Auth Service

    • auth.login(user)
    • auth.signup(user)
    • auth.logout()
    • auth.me()
    • auth.getUser() // synchronous
  • Api Service

    • getAllTrips()
    • getAllMyTrips()
    • addOneTrip()
    • editOneTrip(id)
    • deleteOneTrip(id)
    • getChat()
    • pushMessage()

Server / Backend

HTTP Method URL Request Body Success status Error Status Description
GET /auth/profile Saved session 200 404 Check if user is logged in and return profile page
POST /auth/signup {name, email, password} 201 404 Checks if fields not empty (422) and user not exists (409), then create user with encrypted password, and store user in session
POST /auth/login {username, password} 200 401 Checks if fields not empty (422), if user exists (404), and if password matches (404), then stores user in session
POST /auth/logout (empty) 204 400 Logs out the user
GET /me 400 Show my trips
GET /em Show all trips available
POST /trip/add {from,to,startDate,endDate,needs} 201 400 Create and save a new trip
DELETE /trip/delete/:id {id} 201 400 Delete one trip
POST /pushmessage {} 201 400 Create a message
POST /checkchat 200 400 check chat

Models

  • User model
{
  name: {
    type: String,
    required: true
  },
  surname: {
    type: String,
    required: true
  },
  email: {
    type: String,
    required: true,
    unique: true
  },
  password: {
    type: String,
    required: true
  },
  userType: {
    type: String,
    enum: ['volunteer', 'traveller']
  },
  pocket: {
    type: Number
  },
  comments: [{
    type: ObjectId,
    ref: 'Comment'
  }],
  myTrips: [{
    type: ObjectId,
    ref: 'Trip'
  }]
}, {
  timestamps: {
    createdAt: 'created_at',
    updatedAt: 'updated_at'
  }
}
  • Trip model
   from: {
    type: String,
    required: true
  },
  to: {
    type: String,
    required: true
  },
  startDate: {
    type: Date,
    required: true
  },
  endDate: {
    type: Date,
    required: true
  },
  needs: [{
    type: String
  }],
  requests: [{
    type: ObjectId,
    ref: 'User'
  }],
  img: {
    type: String
  },
  thisAccepted: {
    type: Boolean,
    default: false
  },
  owner: String
},

{
  timestamps: true
}
  • Comment model
title: {
    type: String,
    required: true
  },
  description: {
    type: String,
    required: true
  },
  rating: {
    type: Number,
    required: true
  }
}, {
  timestamps: {
    createdAt: 'created_at',
    updatedAt: 'updated_at'
  }
  • Message model
user: {
    type: ObjectId,
    ref: 'User'
  },
  message: {
    type: String
  },
  notification: {
    emitter: ObjectId,
    toUser: ObjectId,
    isViewed: {
      type: Boolean,
      default: false
    }
  }

}, {
  timestamps: {
    createdAt: 'created_at',
    updatedAt: 'updated_at'
  }
  • Chat model
users: {
    type: [ObjectId],
    ref: 'User'
  },
  messages: {
    type: [ObjectId],
    ref: 'Message'
  }
},
{
  timestamps: {
    createdAt: 'created_at',
    updatedAt: 'updated_at'
  }

Slides

Slides

Wireframes

Wireframes

⚠️ Licence

The code in this project is licensed under MIT license. By contributing to this project, you agree that your contributions will be licensed under its MIT license.

kiwi-em-client's People

Contributors

janlayola avatar jonatoni avatar luyezhan avatar prrrcl avatar rundiye avatar zebader avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.