Skip to content

Instantly share code, notes, and snippets.

@ialtafshaikh
Last active March 4, 2021 12:14
Show Gist options
  • Save ialtafshaikh/fef67f82526e9b96b0d8447b02624526 to your computer and use it in GitHub Desktop.
Save ialtafshaikh/fef67f82526e9b96b0d8447b02624526 to your computer and use it in GitHub Desktop.
Read Me Teamplate

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

What things you need to install the software and how to install them

Give examples

Additional Features

Sample Working

Installing

A step by step series of examples that tell you how to get a development env running

Say what the step will be

Give the example

And repeat

until finished

End with an example of getting some data out of the system or using it for a little demo

Deployment

Add additional notes about how to deploy this on a live system

Live Demo of this Project

References

Built With

  • Dropwizard - The web framework used
  • Maven - Dependency Management
  • ROME - Used to generate RSS Feeds

Authors

See also the list of contributors who participated in this project.

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Todo Backend

A Todo backend built using express server, mongoDB atlas is used to store the data and hosted on Heroku.

Getting Started

Features

  • get all todos related to authenticated user
  • create todo and store in the mongoDb
  • update todo status using todo ID
  • delete todo using todo ID

Additional Features

  • authentication is done by the auth server and communication is done using axios api calls
  • hosted on Heroku platform
  • created docker image
  • microservice architecture propsed
  • used mongoDb cloud to store todo data

Downloading and Running this Project Locally

  1. clone the repository
https://github.com/ialtafshaikh/todo-app-backend.git
  1. add a .env file inside the root folder
DATABASE_URL=your_atlas_db_url(keep this empty is ur not provoding any url)
LOCAL_DB_URL=your local mongo url
DEBUG=true // set true to use local db and false to use atlas
PORT=3000

Sample for local

DATABASE_URL=
LOCAL_DB_URL=mongodb://127.0.0.1:27017/todoapp
DEBUG=true
PORT=3000

Supported Routes

/signup : (method:post) - create your accout
/login : (method:post) - get jwt token and authenticate yourself using the creds (email,password)
/todos : (method:get) - to get all user related tasks
/todos : (method:post) - to create task
/todos?description&status - query this endpoint to get all the property based task of the current logged in user
/todos/id : (method:get) - to get a single task of currently logged in user using _id (mongoose id)
/todos/id : (method:put) - to update the status of the task of currently logged in user using _id (mongoose id)
/todos/id : (method:delete) - to delete a given task of currently logged in user using _id (mongoose id)
/auth : to restrict the user from accessing the resources on route /todos

Note:

  1. Make sure you have internet connection to connect with the auth backend
  2. while signup send object in this format
{
"email":"altafshaikh@cs.com", // unique email
"password":"R#1aasdf", // atleast one cap, one lower, sepcail symbol and total length should be 8 digits
"confirmPassword":"R#1aasdf",
"firstName":"altaf",
"lastName":"shaikh",
"username":"altafshaikh123" // unique username
}
  1. login object and send the jwt auth token into the authorization header
{
"email":"altafshaikh@cs.com",
"password":"R#1aasdf"
}
  1. create a task require the property description
{
"description":  "complete todo backend"
}

Live Demo of this Project

hosted backend

Proposed Microservice Architecture

Using Heroku

heroku microservice archetecture

Using Docker

docker microservice archetecture

Deployment

To Host the Project I had used Heroku Platform. To learn more refer this gist

References

Author

altaf shaikh

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Todo Frontend App

This is a frintend application connected with a todo backend.

Getting Started

ToDo App is simple and awesome app to organize your tasks with very easy to use interface. ToDo can help you to make list of your tasks

  • authenticate user can create a Task
  • authenticate user can check mark their task
  • authenticate user can delete their the task
  • user can create an account- UI interface is provided for the same
  • user can login - UI interface is provided for the same
  • user can logout

Additional Features

  1. Fully Mobile Responsive App
  2. data is persistence on backend server
  3. user can filter the todos: All, Completed, Uncompleted
  4. powered by backend server
  5. data is stored in mongoDB Cloud
  6. can be use by multiple users

Prerequisites

  • You need to have a basic knowledge of HTML, CSS and JavaScript, variables, arrays, functions and objects under your belt.
  • Additionally, you need to have Git, VScode text editor installed on your computer.
  • know the usage of fetch-api to make api calls
  • authorization headers
  • authorization token - JWT
  • cookies

VS code Extension

  • Live server to run the project. Click here to see download instructions and how to use live server to tun the project

Sample Working

todo-app

Downloading and Running this Project Locally

  1. clone the repository using below command
git clone https://github.com/ialtafshaikh/todo-app.git
  1. And run the index.html using Live server

Deployment

To Host the Project I had used Github Pages. To learn more visit her

Live Demo of this Project

live hosted link

References

Author

altaf shaikh

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment