Git Product home page Git Product logo

mangadb's Introduction

Author

@Rafase282

Created by Rafase282

Github | FreeCodeCamp | CodePen | LinkedIn | Blog/Site | E-Mail

Manga Record Microservice

This is an API created to store crucial information for any manga an authenticated user might read. Wtheer you want to keep track of the manga you will rea, already finished or are currently reading this microservice will help you get your data together. In the Future I intend on adding more features but meanwhile the user interface will be separated and this stays as the core backend.

There is an admin account that is declared onteh envarioment variables that basically has root access, it must be created and a secure password used. The admin can override any information if needed including passwords. In the future I will implement email services to mail queries, and particularly to allow for password reset if forgotten.

What you can do:

  1. Create a manga accessed at: POST https://mangadb-r282.herokuapp.com/api/mangas/:user/title=Aiki&author=Isutoshi&url=http%3A%2F%2Fwww.readmanga.today%2Faiki&userStatus=reading&type=Japanese&categories=Action%2C+Ecchi%2C+Martial+Arts%2C+Mature%2C+Seinen&chapter=14&seriesStatus=Completed&plot=There+is+fighting+at+the+high+school+due+to+a+power+struggle+for+control.+The+granddaughter+of+the+chief+director+requests+help+from+the+Aikido+fighting+style+genius.+Will+he+help%3F+Or+will+he+show+his+true+colors+with+his+bad+boy+ways%3F
  2. Get the manga by title: GET https://mangadb-r282.herokuapp.com/api/mangas/:user/:manga_title
  3. Update the manga with this title: PUT https://mangadb-r282.herokuapp.com/api/mangas/:user/:manga_title
  4. Delete the manga by title: DELETE https://mangadb-r282.herokuapp.com/api/mangas/:user/:manga_title
  5. Admin can get a list of all the mangas across the user base: GET https://mangadb-r282.herokuapp.com/api/mangas
  6. Admin can get a list of all users: GET https://mangadb-r282.herokuapp.com/api/users
  7. Admin can delete all users including itself, this requires the admin to be re-created: DELETE https://mangadb-r282.herokuapp.com/api/mangas
  8. Admin can get a list of all the mangas across the user base: GET https://mangadb-r282.herokuapp.com/api/mangas

Remember to use Content-Type: application/x-www-form-urlencoded, the API will tell you what field are required in case you dont want to take a look at the schema.

The Manga Schema:

{
  title: {
    type: String,
    lowercase: true,
    trim: true,
    required: true,
    unique: false,
    match: /[a-z]/
  },
  author: {
    type: String,
    lowercase: true,
    trim: true,
    required: true,
    unique: false,
    match: /[a-z]/
  },
  url: {
    type: String,
    trim: true,
    required: true,
    unique: false
  },
  userStatus: {
    type: String,
    lowercase: true,
    trim: true,
    required: true,
    unique: false,
    match: /[a-z]/
  },
  type: {
    type: String,
    lowercase: true,
    trim: true,
    required: true,
    unique: false,
    match: /[a-z]/
  },
  categories: [{
    type: String,
    lowercase: true,
    trim: true,
    required: true,
    unique: false,
    match: /[a-z]/
  }],
  chapter: {
    type: Number,
    required: true,
    unique: false,
    min: 0,
    match: /[0-9]/
  },
  seriesStatus: {
    type: String,
    lowercase: true,
    trim: true,
    required: true,
    unique: false,
    match: /[a-z]/
  },
  plot: {
    type: String,
    lowercase: true,
    trim: true,
    required: true,
    unique: false,
    match: /[a-z]/
  },
  altName: [{
    type: String,
    lowercase: true,
    trim: true,
    required: false,
    unique: false,
    match: /[a-z]/
  }],
  direction: {
    type: String,
    lowercase: true,
    trim: true,
    required: false,
    unique: false,
    match: /[a-z]/
  },
  userId: {
    type: String,
    lowercase: true,
    trim: true,
    required: false,
    unique: false,
    match: /[a-z-0-9]+/
  },
  username: {
    type: String,
    lowercase: true,
    trim: true,
    required: false,
    unique: false,
    match: /[a-z-0-9]+/
  },
  thumbnail: {
    type: String,
    trim: true,
    required: true,
    unique: false
  }
}

The User Schema:

{
  username: {
    type: String,
    lowercase: true,
    trim: true,
    required: true,
    unique: true,
    match: /[a-z-0-9]+/
  },
  password: {
    type: String,
    trim: true,
    required: true,
    unique: false
  },
  email: {
    type: String,
    lowercase: true,
    trim: true,
    required: true,
    unique: true
  },
  firstname: {
    type: String,
    lowercase: true,
    trim: true,
    required: false,
    unique: false,
    match: /[a-z]/
  },
  lastname: {
    type: String,
    lowercase: true,
    trim: true,
    required: false,
    unique: false,
    match: /[a-z]/
  }
}

To Do:

  • Add thumbnail property to Mongoose Schema and make it work with current data.
  • Switch to JSON Web Tokens.
  • Validate E-mails.
  • Verify E-mails.
  • Implement password reset mechanism.
  • Implement email support to send new passwords when a request for a forgotten password is made.

mangadb's People

Contributors

rafase282 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.