Giter Club home page Giter Club logo

cycle-safe's Introduction

Cycling Safe SOS API Documentation

Overview

The Cycling Safe SOS API is designed to provide safety features for cyclists, allowing them to send SOS messages and handcrafted 'im safe' messages to their favorite people. The backend of the API is built using Node.js, Express, MongoDB, Twilio for SMS functionality and NodeMailer for email functionality.

Features

  1. Send SOS with predefined message as text message using Twilio.
  2. "I'm Safe" api to send handcrafted emails to your favorite people.
  3. User authentication and authorization using JWT.
  4. User registration and login with bcrypt for password hashing.
  5. Ability to update user information and manage custom messages.

Routes

Authentication Routes

  • POST /api/auth/signup: Register a new user.
  • POST /api/auth/signin: Authenticate user and generate JWT token.

User Routes

  • GET /api/users/id/:id: Retrieve user information by ID.
  • GET /api/users: Retrieve a list of all users.
  • PUT /api/users/update/:id: Update user information by ID.
  • DELETE /api/users/delete/:id: Delete user by ID.

Dont FORGET to use jwt token on Authorization header while using the SOS Route and Custom Messages Route. You will get jwt token immediately after signin.

SOS Routes

  • POST /api/sos: Send SOS messages to emergency contacts.

Screenshot

Home

Custom Messages Routes

  • POST /api/imsafe:/relationship: Send a custom email to your favorite people while cycling.

Screenshot Home

Home

Installation

  1. Clone the repository: git clone https://github.com/adarsh-2425/cycling-safe.git
  2. Install dependencies: npm install
  3. Set environment variables: Create a .env file with necessary configurations.

Usage

  1. Start the server: npm start
  2. Access the API via http://localhost:3000/api/

Contributing

Contributions are welcome! Feel free to fork the repository, make changes, and submit pull requests.

License

This project is licensed under the MIT License.

cycle-safe's People

Contributors

adarsh-2425 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.