Giter VIP home page Giter VIP logo

crud_backend's Introduction

API Class Structure

This section provides a textual representation of the class structure and relationships in our API.

Class Descriptions

Express App

  • Description: Our Node.js Express application that handles API requests and routes.
  • Attributes:
    • app: The Express instance.
  • Endpoints:
    • POST /api: Create a new person.
    • GET /api/:userId: Get details of a person by ID.
    • PUT /api/:userId: Update details of a person by ID.
    • DELETE /api/:userId: Delete a person by ID.
    • POST /api/byname: Create a new person by name.
    • GET /api/byname/:userName: Get people by name.
    • GET /api/allusers: Get all users.

Firebase Admin

  • Description: The Firebase Admin SDK configuration and connection.
  • Attributes:
    • admin: The Firebase Admin instance.
    • databaseURL: The Firebase database URL.
    • credential: Authentication credentials.

Firestore

  • Description: Firebase Firestore, our NoSQL database.
  • Attributes:
    • collection('people'): The 'people' collection where user data resides.

Person

  • Description: A model class representing an individual person.
  • Attributes:
    • name: The person's name.
    • age: The person's age.
    • email: The person's email address.
  • Methods:
    • add(): Add a new person.
    • get(): Get details of a person.
    • update(): Update a person's details.
    • delete(): Delete a person.
    • getAll(): Get details of all users.

Relationships

  • The Express App interacts with Firebase Admin and Firestore to perform CRUD operations on the Person model.
  • The Person model interacts with Firestore to read, update, delete, and fetch all person records.

This textual representation provides an overview of the key components and their interactions in our API.

UML DIAGRAM

+-------------------+       +-----------------------+
|     Express App  |       |    Firebase Admin    |
+-------------------+       +-----------------------+
| - app             |       | - admin               |
|                   |       | - databaseURL         |
| + POST /api       |       | - credential          |
| + GET /api/:userId|       |                       |
| + PUT /api/:userId|       |                       |
| + DELETE /api/:userId|    |                       |
| + POST /api/byname|       +-----------------------+
| + GET /api/byname/:userName|
| + GET /api/allusers|     
|                   |
+-------------------+
         |
         |
         |
+-------------------+
|      Firestore    |
+-------------------+
|                   |
| + collection('people')|
|                   |
+-------------------+
         |
         |
         |
+-------------------+
|      Person       |
+-------------------+
| - name            |
| - age             |
| - email           |
| + add()           |
| + get()           |
| + update()        |
| + delete()        |
| + getAll()        |
+-------------------+ 

crud_backend's People

Contributors

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