Giter Club home page Giter Club logo

mytodo's Introduction

MyTodo

MyTodo is a TODO list application with a backend built using Node.js and MySQL database. It provides an API to manage users and their tasks. The goal of the project was to introduce us to the web by making an API. As a bonus we could make a simple front end login page.

Prerequisites

Make sure you have the following installed:

  • Node.js
  • MySQL

Installation

  1. Clone the repository:
git clone <repository-url>
  1. Install dependencies:
cd EpyTodo
npm install
  1. Set up the environment variables: Create a .env file in the root directory and add the following replacing the between the "<>" with your own database login and secrets:
MYSQL_DATABASE=<your-mysql-database>
MYSQL_HOST=<your-mysql-host>
MYSQL_USER=<your-mysql-username>
MYSQL_ROOT_PASSWORD=<your-mysql-password>
SECRET=<your-secret-key-for-jwt>
  1. Import the database schema: Create a file called epytodo.sql and write the database schema according to the provided instructions. Import the file into your MySQL server.

  2. Start the server:

npm run dev
  1. Start the front-end:
cd bonus/frontend-epytodo
npm run dev

The site will be available at http://localhost:3001

API Routes

  • POST /register | Register a new user.
  • POST /login | Authenticate a user and generate a JWT token.
  • GET /user | Get the current user's information.
  • GET /user/todos | Get all tasks for the current user.
  • GET /users/:id or :email | Get user information by ID or email.
  • PUT /users/:id | Update user information.
  • DELETE /users/:id | Delete a user.
  • GET /todos | Get all tasks.
  • GET /todos/:id | Get a task by ID.
  • POST /todos | Create a new task.
  • PUT /todos/:id | Update a task.
  • DELETE /todos/:id | Delete a task.

Technologies Used

Backend

  • Node.js
  • Express.js
  • MySQL
  • Dotenv
  • JsonWebToken
  • BcryptJS
  • Body-Parser

Frontend Bonus

  • Next.js
  • TailwindCSS
  • DaisyUI

mytodo's People

Contributors

harmonie-durrant avatar

Stargazers

 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.