Coder Social home page Coder Social logo

djoksimo / srvice-api Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 978 KB

The Srvice Node/Express.js API

License: Mozilla Public License 2.0

JavaScript 25.65% Dockerfile 0.25% TypeScript 74.11%
api auth0 core express javascript mongodb mongoose monolith nodejs pusher

srvice-api's People

Contributors

djoksimo avatar erikterwiel avatar fvuja12 avatar jinbarai avatar nlb13x avatar srvice-temp avatar taranpreetnatt avatar

Stargazers

 avatar

srvice-api's Issues

[53] User Ratings

The agent can review the user after matching with them, based on a 5-star rating + text comment

[82] Add Unit Tests fo Creating Services

  • Test db change (for src/services/ServiceService)
  • Test createService for serviceManager change (src/managers/ServiceManager)
  • Test [POST] /service/ endpoint for creating services using supertest (https://github.com/visionmedia/supertest)

[109] Add VS code configuration

Add .vscode with settings.json and extensions.json (similar to srvice-mobile-agent) with recommended extensions (eslint, gitlens, prettier, etc.) and appropriate configurations (auto lint fix on save, etc ).

Look at other open source express / node projects for inspiration.

Add prettier configuration as well

[123] Wrap find methods with filter for isDeleted (2)

Any find methods findById, find, .... should be wrapped in a utility function called findNonDeleted that allow us to perform queries as we normally would with mongoose. Model.find.....

We'll work on this one together @nipunlamba1

[74] Fix all delete statements

When you delete an item that exists in other collection, it should be cleared from the respective array field.

E.g when you delete a service, the agent should not contain that service in its array of services

[122] Srvice DB Seeding (4)

We currently have no local db and seeding scripts for populating the db with some initial data.

This ticket will make development experience significantly better.

  1. Create a local db for the isRunningInDev environment using . MongoMemoryServer
  • reuse logic from mongoHelper.ts and src/index.ts to create an in-memory local database.
  1. Create some mock data files (typescript objects and arrays) (similar to the files in src/test/mock).

  2. Create a script called seed.ts that can be called via npm run seed by adding "seed": "npx ts-node <path-to-seed.ts>" in package.json.

Acceptance criteria

  • the developer should be able to run a script that creates a mock agent account, some services, attach some offerings to those services, attach some ratings to those services
  • the script should create the seed data using chai to make local HTTP requests that call our POST and PATCH endpoints.
    ^ see mock/CLIGen and mock/MockGen for inspiration.

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.