React Application Todolist with Node.js, Typescript, Fauna(DB)

Overview

🧰 Setup to run the project

  • Create a file named .env and paste the following content: FAUNADB_SECRET_KEY=fnAEZUdQWoAAREiKyFJZK1_f4W3_pavPIu9FAQAY
  • Install dependencies: run npm install in terminal
  • Run project: run npm run dev in terminal

💻 Stack used

🛣️ Routes

  • base route: http://localhost:5000/
  • id's for testing routes: 316824203878727746 and 316824203878727746

GET ➡️ /cyber-accounts/:id

Reply:

/*
Dates are in milliseconds

The deposits and withdrawals items are composed of tuples, where the first item of the tuple is the deposit amount.
and the second item is the filing date
*/

{
  "status": 200,
  "message": "User found!",
  "payload": {
    "cyberEmail": "[email protected]",
    "name": "Crud - Fauna 2",
    "accountType": "checking-account",
    "cyberId": "51e57154-b897-4895-a808-086f7be29220",
    "createdAt": 1638405955077,
    "balance": 1997.5999999999997,
    "updatedAt": 1638478336635,
    "deposits": [
      [
        1000,
        1638450333786
      ],
      [
        1000,
        1638479874329
      ]
    ],
    "withdrawals": [
      [
        300.3,
        1638452612812
      ]
    ]
  }
}

POST ➡️ /cyber-accounts/

Expected Body:

{
  "cyberEmail": "[email protected]",
  "name": "Post - test",
  "accountType": "saving-account"
}

PUT ➡️ /cyber-accounts/:id

Expected Body:

/*
All these items are editable in the collection
*/

{
  "cyberEmail": "[email protected]",
  "name": "Put - test",
  "accountType": "checking-account"
}

PUT ➡️ /delete/:id/cyber-accounts/

/*
This route is a soft delete, it just sets two properties in the database, they are:
  - deleted: true
  - deletedAt: Date.now() - current date
*/

PUT ➡️ /deposit/:id/

/*
This route adds the deposit to the current cyberAccount balance and in addition
records the deposit amount and date in a deposits array
*/

{
"deposit": 1000
}

PUT ➡️ /withdraw/:id/

/*
This route subtracts the withdrawal amount and withdrawal fee from the current cyberAccount balance,
but only if these amounts are less than the balance.
The amount and date of withdrawal are recorded in an array withdrawals
*/

{
"withdraw": 300
}
You might also like...
Chat Application Using React, Node.js and Socket.io with MongoDB

Steps to Start the App Install the Public Dependencies Install the Server Dependencies In the Server Directory there's a .env file. Change the value o

A full stack task manager application built with node, react,mongodb,and mantine.

A full stack task manager application built with node, react,mongodb,and mantine.

A basic movie rating application which created with using Redux Toolkit, Axios for API calls, React Router DOM for Routing and Node-SASS for my SCSS compile to CSS

A basic movie rating application which created with using Redux Toolkit, Axios for API calls, React Router DOM for Routing and Node-SASS for my SCSS compile to CSS..

Social Media Application using React with CSS3 & Node.js

Social Media Application ✨ Social Media Application using React with CSS3 & Node.js. Features 🔥 ✔️ Authentication with form account ✔️ Authentication

A simplified Jira clone built with React/Babel (Client), and Node/TypeScript (API). Auto formatted with Prettier, tested with Cypress.
A simplified Jira clone built with React/Babel (Client), and Node/TypeScript (API). Auto formatted with Prettier, tested with Cypress.

A simplified Jira clone built with React and Node Auto formatted with Prettier, tested with Cypress 🎗 Visit the live app | View client | View API Wha

React, Next.js, MaterialUI, Styled-Components, TypeGraphQL, URQL, ApolloServer (express), TypeORM, PostgreSQL, Node.js, TypeScript
React, Next.js, MaterialUI, Styled-Components, TypeGraphQL, URQL, ApolloServer (express), TypeORM, PostgreSQL, Node.js, TypeScript

This repo is inspired by https://github.com/benawad/lireddit Features Include: Server-side rendered data from postgres Create user graphql mutation wi

Authentication boilerplate with react, typescript, graphql, node, mongo

Authentication Boilerplate with GraphQl Description Progressive registration and authentication boilerplate with GraphQl. Built with React, Typescript

My project of Game Store using my knowledge in Node, Nest, React and Typescript

A progressive Node.js framework for building efficient and scalable server-side applications. Description Nest framework TypeScript starter repository

Assignment of Milestone 11 (Client Side) , Making an Website (Travel Related) using Firebase Authentication, Node, Express, MongoDB , Heroku, React Router, JavaScript (ES6) & React Bootstrap Etc.
Assignment of Milestone 11 (Client Side) , Making an Website (Travel Related) using Firebase Authentication, Node, Express, MongoDB , Heroku, React Router, JavaScript (ES6) & React Bootstrap Etc.

Simple Site of 'Travel Related Service' (Holiday Dreams) - Assignment (Milestone - 11) This Repo is for 'Client Side' This Assignment is mainly on Nod

Owner
Cronus Diamond
Cronus Diamond
Powerfull TODOLIST app with React.js with Add, Remove, Remove all, Edit, Local Storage features.

Advance React TODOLIST Application Powerfull TODOLIST app with React.js with Add, Remove, Remove all, Edit, Local Storage features. Clone this project

Taher Ahmed Ashraf 4 Jul 19, 2022
todoList ✔️ Lista de Tarefas feita em React para treinar alguns conhecimentos importantes.

todoList ✔️ Lista de Tarefas feita em React para treinar alguns conhecimentos importantes. ❤️ Para executar, basta clonar o repositório e digitar no t

Izabella Ribeiro de Souza Silva 4 Oct 12, 2021
Online Marketplace Built with MERN stack (MongoDB, Express, React and Node)Online Marketplace Built with MERN stack (MongoDB, Express, React and Node)

?? Shopping App ?? Online Marketplace Built with MERN stack (MongoDB, Express, React and Node). ⚡️ ⚡️ ⚡️ Kiwi Shop ⚡️ ⚡️ ⚡️ ?? Table of contents Main

Tomiwa Adeyemi 10 Dec 23, 2022
React-node-notion - An example of a React app and Node server using Notion as a CMS

Running the Project Create an env file with your Notion credentials Create a ser

Alex 18 Nov 4, 2022
☁️ Application using Redux, Redux-Saga, react-redux-toastr, React-Select, Immer, styled-components, customize-cra, react-app-rewired and consuming the features of the Node.js - SaaS API

☁️ Application using Redux, Redux-Saga, react-redux-toastr, React-Select, Immer, styled-components, customize-cra, react-app-rewired and consuming the features of the Node.js - SaaS API

null 3 Aug 19, 2022
⚡️ realtime scalable server performance monitor application built using react, node, redis and socket.io with clusters module.

PERFMonitor - Performance Monitoring System Introduction PERFMonitor is a web application that shows you performance and problems of one or more serve

Dulaj Kavinda 13 Jul 31, 2022
Smart-face-detector - A face detector application made with React JS, Node JS, Express JS, and PostgreSQL.

Getting Started with Create React App This project was bootstrapped with Create React App. Available Scripts In the project directory, you can run: np

Ken Tandrian 1 Sep 24, 2022
Application to practice the knowledge in React, and TailWind CSS, and in the future start the studies in Node

NBA Cards Aplicação para praticar os conhecimentos em React, e TailWind CSS, e futuramente iniciar os estudos em Node. Intuito A aplicação consiste em

null 1 Feb 12, 2022
A full stack application of a personal wallet made with React, Node and MongoDB

The frontend of a full stack application of a personal wallet made with React, Node and MongoDB that allows you to add inputs, outputs and see all your extract.

Bernardo Rodrigues 5 Jun 2, 2022
A social media Full Stack Application using React, Node.js

PinShare This is a Full Stack Application using React, Node.js, sanity the app is called PinShare and it is a simple social media app that allows user

Ravi Singh 6 Sep 3, 2022