Giter Club home page Giter Club logo

obux's Introduction

Obux

obuxLogo

Obux is an app that helps you borrow and trade books with other people.


Obux Will let you trade books with someone that has a book of your interest, borrow someone's else book or put your own books up for trades and for other people to borrow.

Technologies Used

For this project, we've used NestJS for the Backend, MySQL (TypeOrm) for database and ReactNative for the Frontend (Expo).

Documentation Summary

How to run it

BackEnd

First you got to setup the BackEnd. For this, download NodeJS
After it, you must download the dependencies by executing the following commands

hello@world:~$ yarn

And now, all you gotta you do is run. Just run this command (Don't forget to set the environment variables in a .env file)

hello@world:~$ yarn start:dev

FrontEnd

First, you've gotta download and install Expo. After it, run the following command in the frontend folder.

hello@world:~$ yarn
hello@world:~$ expo start

Project Endpoints

User Endpoints

Route Method Description
/users/create POST Route that creates a User
/users/get/:id GET Gets the user by its ID
/users/login POST Route for user login
/users/deluser/:id DELETE Deletes the user by its ID
/users/update/:id PUT Updates the user by its ID
/rateuser POST Creates a rating for the user based on reviews
/finduser POST Find a user by its city and/or state

Book Endpoints

Route Method Description
/books/create POST Route that creates a book
/books/get/:id GET Gets book by its ID
/books/delete/:id DELETE Delete book by its ID
/books/update/:id PUT Updates a book by its ID
/books/find POST Route to search for books by its name, genre, year or author

Pass Recovery Endpoints

Route Method Description
/request POST Route that sends the pass recovery email
/recovery/:token GET Checks token
/redefinepassword/:token POST Redefine password

Project Models

User Schema

FieldName Translated Type Required Unique
nome name String true false
dataNasc birthday Date true false
telefone mobile number String false false
email email String true true
cpf cpf String true true
senha password String true false
cidade city String true false
estado state String true false
biblioteca library ObjectId false false
pfp profile pic String false false
givenrates givenrates Number false false
totalrates totalrates Number false false

Book Schema

FieldName Translated Type Required
titulo title String true
autor author String false
ano year String false
genero genre String false
qualidade quality String true
foto photo String false
disponibilidade availability Number true
sinopse synopsis String false

Transaction Schema

FieldName Translated Type Required
due due Date true
user user ObjectId false
receiver receiver ObjectId false

Design

Click here to check the app design at figma

Project status

Want to keep track of the currently project status? Just follow this link (portuguese only)

Missing Something? Something is not working?

  • Open a GitHub issue, or
  • Send a pull request

Project members

Jônatas Luca

obux's People

Contributors

dependabot[bot] avatar jonatasfernandespimenta avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

obux's Issues

Rotas não são RESTful

Problema

As rotas listadas no README estão em desacordo com as recomendações para APIs REST.
Veja: https://docs.microsoft.com/pt-br/azure/architecture/best-practices/api-design

Solução proposta

Renomear as rotas de recursos, onde possível, para utilizar apenas substantivos e deixar a semântica da ação realizada a cargo do método HTTP. Por exemplo: (createuser, deluser, updateuser, getuser) -> (user).

Sugestão

Modificar a rota /rateuser para /user/{idUser}/rate
Justificativa: a rating de um usuário é um recurso relacionado e que pertence a um usuário.

Sugestão

Modificar a rota de busca /finduser para /user com o método GET, e incluir no README as possíveis query params que a rota aceita (city, state)

Vi o projeto de vocês no Discord da Rocketseat e reparei nisso no README, e gostaria de tentar contribuir um pouco.

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.