Coder Social home page Coder Social logo

jhordyess / mini-pern Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 2.32 MB

Simple React component using MUI-Datatables, with CRUD requests using PERN stack.

License: MIT License

Shell 4.48% JavaScript 91.66% HTML 1.46% CSS 1.18% Dockerfile 1.22%
crud pern-stack prisma-client axios material-ui mui-datatables docker multiple-containers vscode express

mini-pern's Introduction

Mini PERN project

Simple React component using MUI-Datatables, with CRUD requests using PERN stack.

Description

This project is a simple CRUD application using the PERN stack (PostgreSQL, Express, React, Node.js).

The backend is a REST API built with Node.js and Express, using Prisma as ORM to connect to the PostgreSQL database.

The frontend is a React application built with Vite, using Material-UI and MUI-Datatables for the UI.

The project is containerized using Docker and Docker Compose, for frontend, backend and database, and interacts as follows:

Interaction

For the database, the following model was used:

Logical model

Technologies Used

Backend

Frontend

Others

Screenshots

Index

How to use for development

You can use the VSCode dev containers to run the project in a containerized environment.

You need to have installed Docker and VSCode, and the Dev Containers extension.

  1. Clone this repository
git clone [email protected]:jhordyess/mini-pern.git
  1. Open the project in VSCode
code mini-pern
  1. Create a .env file in the root folder by copying the example from the .env.example file.

  2. Open the integrated terminal (Ctrl+Shift+`) and run the following command:

docker compose -f docker-compose.dev.yml up -d
  1. Open the command palette (Ctrl+Shift+P) and select the option Dev Containers: Open folder in Container.

  2. Select the folder backend and wait for the container to be built.

  3. Open the integrated terminal (Ctrl+Shift+`) and run the following command:

yarn dev
  1. Repeat the steps 5, 6 and 7 for the folder frontend.

  2. Open the browser and visit http://localhost:5173/ and lets code!

How to use for production

To run the project in production mode, remember to create the .env file in the root folder by copying the example from the .env.example file.

Then, run the following command:

docker compose -f docker-compose.prod.yml up -d

To stop or remove the containers, use the following commands:

docker compose -f docker-compose.prod.yml down

Take note that this production configuration is just for testing purposes, and maybe need some changes to be used in a real production environment.

To-Do

  • Add more to-do's ๐Ÿ˜…

Contribution

If you would like to contribute to the project, open an issue or make a pull request on the repository.

License

ยฉ 2022> Jhordyess. Under the MIT license. See the LICENSE file for more details.


Made with ๐Ÿ’ช by Jhordyess

mini-pern's People

Contributors

jhordyess 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.