Code Monkey home page Code Monkey logo

registered-app's Introduction

๐Ÿ‘ค Registered

User registration application capable of creating, reading, updating and deleting database users (CRUD). The project is divided into Front-end and Back-end, both environments (and the database) run inside a container created by Docker Compose ๐Ÿณ.

๐Ÿงฐ Powered by
  • Next.js
  • Sass/Scss
  • TypeScript
  • Node.js
  • Express
  • Prism
  • PostgreSQL
  • Docker
๐Ÿ”ง Installation

โš ๏ธ You must have Docker and Docker Compose installed on your machine to run this project in containers.

  • Clone this repository:
git clone [email protected]:adilsongb/registrado-app.git
  • Access the project folder:
app-registered cd
  • Upload application containers using Docker Compose command:

๐Ÿ“Œ The process of installing the dependencies is done during the construction of the container for each environment.

docker-compose up

โš ๏ธ The development environment is created using the docker-compose.yml file! With it, the Back and Front containers are updated with each change made to the project files.

  • All very well! You can access the application at the following addresses:
    • Frontend: http://localhost:3000/
    • Backend: http://localhost:3001/
๐Ÿ’ป Deploy
  • The deployment is performed on the Heroku platform. Application links:
  • The deployment of both environments (Front and Back-end) is performed automatically through GitHub Actions. Any change made to the main branch of the project's remote repository starts the deployment process.
  • The deploy action file can be found at: .github/workflows/main.yml.
๐Ÿ’ก Hint
  • In the project there is a file app.code-workspace, with it a workspace is created in VSCode separating the Front-end and the Back-end of the application.

Backend

  • The application's back-end was developed with Node.js, TypeScript, Express and Prisma. The application can be accessed locally (if the container is running) at http://localhost:3001/.
๐Ÿ“ Organization
โ””โ”€โ”€ ๐Ÿ“‚ registered-app
    โ”œโ”€โ”€ ๐Ÿ“‚ backend
    | โ”œโ”€โ”€ ๐Ÿ“‚ prism
    | | โ”œโ”€โ”€ ๐Ÿ“ migrations // Prisma schema migration history
    | | โ”œโ”€โ”€ ๐Ÿ“„ seed.ts // File with initial DB data
    | | โ””โ”€โ”€ ๐Ÿ“„ schema.prisma // File that references and configures DB tables
    | โ””โ”€โ”€ ๐Ÿ“‚ src
    โ”‚ โ”œโ”€โ”€ ๐Ÿ“‚ database
    โ”‚ | โ””โ”€โ”€ ๐Ÿ“„ connection.ts // Connect to the database through Prisma Client
    | โ”œโ”€โ”€ ๐Ÿ“ models // Folder with files that communicate directly with DB
    | โ”œโ”€โ”€ ๐Ÿ“ services // Folder with files that connect the client and DB
    | โ”œโ”€โ”€ ๐Ÿ“ controllers // Folder with files that communicate directly with the client
    | โ”œโ”€โ”€ ๐Ÿ“ interfaces // Folder with object typing interfaces
    | โ”œโ”€โ”€ ๐Ÿ“ validations // Folder with the validations performed by the Joi library
    | โ”œโ”€โ”€ ๐Ÿ“ middleware
    | | โ””โ”€โ”€ ๐Ÿ“„ error.ts // Middleware for API error handling
    | โ”œโ”€โ”€ ๐Ÿ“ routes // Folder with API routes (Endpoints)
    | โ””โ”€โ”€ ๐Ÿ“„ server.ts // API configuration and initialization file
    โ””โ”€โ”€ ๐Ÿ“ frontend
๐ŸŽฏ Endpoints

GET

  • /users/page/:page

    • Returns an array containing 10 users. Depending on the number passed in the :page parameter only a specific fraction of users is returned, for example: The /users/page/2 endpoint returns users of order 11-20. (Endpoint created especially to give the pagination effect on the Front-end)

      ๐Ÿชƒ Return example
      [
        {
          "id": 1,
          "name": "Adilson Gabriel",
          "email": "[email protected]",
          "password": "F4MAJVQ3hkFElTb",
          "createdAt": "2022-05-26T21:42:34.364Z"
        },
        {
          "id": 2,
          "name": "Carlos Nogueira",
          "email": "[email protected]",
          "password": "GsI2Y00ca05Lftu",
          "createdAt": "2022-05-26T21:42:34.364Z"
        },

registered-app's People

Contributors

takeshi-su57 avatar

Stargazers

Hyper World avatar Oleksandr Guzenko avatar WebStar1014 avatar  avatar FullStack & Blockchain avatar EliteVeteran 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.