All Projects → AndrewJBateman → pern-stack-auth

AndrewJBateman / pern-stack-auth

Licence: other
📋 Repair. PERN stack todo app with jwt user authentication

Programming Languages

javascript
184084 projects - #8 most used programming language
HTML
75241 projects
CSS
56736 projects
shell
77523 projects

Projects that are alternatives of or similar to pern-stack-auth

Stackoverflow Clone
Clone project of a famous Q/A website for developers which is stackoverflow built using MySQL-Express-React-Node 🌐
Stars: ✭ 182 (+970.59%)
Mutual labels:  stack, backend
Aws Boilerplate
Opinionated full stack web app's boilerplate, ready to be deployed to AWS platform.
Stars: ✭ 682 (+3911.76%)
Mutual labels:  stack, backend
Node Express Mongodb Jwt Rest Api Skeleton
This is a basic API REST skeleton written on JavaScript using async/await. Great for building a starter web API for your front-end (Android, iOS, Vue, react, angular, or anything that can consume an API). Demo of frontend in VueJS here: https://github.com/davellanedam/vue-skeleton-mvp
Stars: ✭ 603 (+3447.06%)
Mutual labels:  postman, jwt-authentication
les-chat
Real-time messenger with private, public & group chat. Made using PERN + GraphQL stack.
Stars: ✭ 48 (+182.35%)
Mutual labels:  pern, pern-stack
Stackoverflow-Clone-Frontend
Clone project of a famous Q/A website for developers built using MySQL, Express, React, Node, Sequelize 🌐
Stars: ✭ 379 (+2129.41%)
Mutual labels:  stack, backend
Pharmacy-Mangment-System
👨‍💻 🏥 MEAN stack Pharmacy Management system.
Stars: ✭ 229 (+1247.06%)
Mutual labels:  backend, jwt-authentication
Jersey Jwt
Example of REST API with JWT authentication using Jersey, Jackson, Undertow, Weld, Hibernate and Arquillian.
Stars: ✭ 131 (+670.59%)
Mutual labels:  postman, jwt-authentication
jersey-jwt-springsecurity
Example of REST API with JWT authentication using Spring Boot, Spring Security, Jersey and Jackson.
Stars: ✭ 44 (+158.82%)
Mutual labels:  postman, jwt-authentication
phalcon-micro-rest-api-skeleton
This is a basic API REST skeleton written on Phalcon PHP. Great For building an MVP for your frontend app (Vue, react, angular, or anything that can consume an API)
Stars: ✭ 57 (+235.29%)
Mutual labels:  postman, jwt-authentication
web-haskell-graphql-postgres-boilerplate
Modern webserver in Haskell: Graphql + Postgresql + Authentication + DB migration + Dotenv and more
Stars: ✭ 114 (+570.59%)
Mutual labels:  stack, jwt-authentication
upper
Upper is a open source back-end framework based on the Dart language.
Stars: ✭ 39 (+129.41%)
Mutual labels:  backend
Platform
The DigitalState Platform
Stars: ✭ 39 (+129.41%)
Mutual labels:  postman
angular-8-jwt-authentication
Demo project for Angular 8 JWT Authentication with HttpInterceptor and Router
Stars: ✭ 36 (+111.76%)
Mutual labels:  jwt-authentication
larvelworkerman
Laravel5.5 + dingo + jwt + workerman 具有聊天的框架. 接口采用dingo标准的RESTFUL模式,JWT用于token验证,workerman用于聊天工具开发只要是websocket
Stars: ✭ 20 (+17.65%)
Mutual labels:  jwt-authentication
backend
Laravel 8 backend for a genealogy website.
Stars: ✭ 82 (+382.35%)
Mutual labels:  backend
Mentro-Community-Blog
A blogging website for the mentrozens community with topics focused on Web development and Open Source.
Stars: ✭ 26 (+52.94%)
Mutual labels:  backend
articlelist
🐣 Filter für Artikellisten
Stars: ✭ 20 (+17.65%)
Mutual labels:  backend
vaadin-stepbystep-demo-contacts
Step by step demo Vaadin 8 app with simple JPA backend
Stars: ✭ 13 (-23.53%)
Mutual labels:  backend
nfw
A jsonapi boilerplate for @nfw-core with mikro-orm
Stars: ✭ 23 (+35.29%)
Mutual labels:  jwt-authentication
netty-chat-tutorial
Netty Chat tutorial with Protobuf
Stars: ✭ 23 (+35.29%)
Mutual labels:  jwt-authentication

PERN Full Stack Todo

  • PostgreSQL Express React Node (PERN) full-stack app, integrates React frontend with Node.js backend. Tutorial code from The Stoic Programmers (see 'Inspiration' below)
  • Note: to open web links in a new window use: ctrl+click on link

GitHub repo size GitHub pull requests GitHub Repo stars GitHub last commit

📄 Table of contents

📚 General info

Backend

  • PostgreSQL needs to be installed and running - I started it from my Windows 10 PostgreSQL 12 dropdown option 'SQL shell (psql)'
  • Postman used to test the backend before frontend was available

Frontend

  • React frontend includes a simple todo list with a user input field and a table of todos below. User can edit and delete todos.
  • JavaScript XML (JSX) used to write HTML elements in Javascript
  • React Fragments used to show table of todos as a row with columns in the DOM

📷 Screenshots

Backend screenshot Frontend & backend screenshot Frontend screenshot

📶 Technologies - Backend

📶 Technologies - Frontend

💾 Setup - Backend

  • Change to /server directory
  • Install dependencies using npm i
  • Install nodemon globally if you don't already have it
  • Install PostgreSQL & run it (requires the password you created during installation)
  • Add database access credentials to db.js - recommend installing npm dotenv & using .env to hide credentials if commiting to Github
  • Postgresql shell commands: \l list all databases. \c database1 connect to database1. \dt inspect tables. \d+ inspect table & show relation information. \q to quit.
  • Run nodemon server for a dev server
  • http://localhost:5000/ can be accessed for CRUD operations such as POST, GET, PUT, DELETE etc. using Postman

💾 Setup - Frontend

  • Change to /client directory
  • Install dependencies using npm i.
  • run npm start. Frontend will open at http://localhost:3000/

💻 Code Examples - Backend

  • backend index.js: express post method used to add new todo [description] to postgreSQL database using SQL INSERT INTO statement
// create a todo
app.post('/todos', async (req, res) => {
  try {
    const { description } = req.body;
    const newTodo = await pool.query(
      "INSERT INTO todo (description) VALUES($1) RETURNING *",
      [description]
    );

    res.json(newTodo.rows[0]);
  } catch (err) {
    console.error(err.message);
  }
})

💻 Code Examples - Frontend

  • function that runs when user presses 'Add' button: the input body (description) is converted from a JavaScript object to a JSON string & POSTed to the todo database
  const onSubmitForm = async e => {
    e.preventDefault();
    try {
      const body = { description };
      const response = await fetch("http://localhost:5000/todos", {
        method: "POST",
        headers: { "Content-Type": "application/json" },
        body: JSON.stringify(body)
      });

      console.log("Successfully added todo: ", response);
      window.location = "/";
    } catch (err) {
      console.error(err.message);
    }
  };

🆒 Features - Backend

  • All data stored in PostgreSQL database that can also be viewed and changed from the PostgreSQL shell (psql)

🆒 Features - Frontend

📋 Status & To-Do List

  • Status: error in registration
  • To-Do: Fix errors and complete testing

👏 🔧 Inspiration/General Tools

📁 License

  • N/A

✉️ Contact

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].