Skip to content

A backend service for providing quotes through an API, supporting user authentication, subscription plans, and PayPal integration for subscription upgrades. It is built with Node.js, Hono, Prisma, MongoDB, JWT and paypal.

Notifications You must be signed in to change notification settings

Ahmed-Nehad/quotes-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Quotes API

A backend service for providing quotes through an API, supporting user authentication, subscription plans, and PayPal integration for subscription upgrades. It is built with Node.js, Hono, Prisma, MongoDB, JWT and paypal.

Features

  • User Authentication
  • Subscription Plans Management
  • Fetch a random quote

Usage

Once the server is running and you have added quotes to the database, you can start making requests to the API.

Sign up a new user

curl -v -X POST http://localhost:3003/sign-up \
-H 'Content-Type: application/json' \
-d '{
    "name": "Ahma"`,
    "email": "exmaple@email.com",
    "password": "password",
}'

example response

{
    "token": "eyJhbG...",
    "apiKey": "UqyNtusL-KA0ribVFM5Zwo"
}

Using the api to get a random quote

curl -v -X GET http://localhost:3003/v1/quotes?key=UqyNtusL-KA0ribVFM5Zwo

example response

{
    "text": "Imagination is more important than knowledge.",
    "categoryName": "fun",
    "author": "Albert Einstein"
}

License

This project is licensed under the MIT License.

About

A backend service for providing quotes through an API, supporting user authentication, subscription plans, and PayPal integration for subscription upgrades. It is built with Node.js, Hono, Prisma, MongoDB, JWT and paypal.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published