djoksimo / srvice-api Goto Github PK
View Code? Open in Web Editor NEWThe Srvice Node/Express.js API
License: Mozilla Public License 2.0
The Srvice Node/Express.js API
License: Mozilla Public License 2.0
refactor/rearrange code so that isOwner
methods can be plugged in as middleware with less repetition.
currently have to create separate isOwner
function for every service.
https://github.com/srvice/srvice-api/search?q=isOwner&unscoped_q=isOwner
Idea: reduce repetition of this code with same flexibility.
Research best options relating to mongodb document ownership
The agent can review the user after matching with them, based on a 5-star rating + text comment
Docker pivot
Having an isApproved
bool is easy to hack so we have to come up with a better solution.
Potentially can use:
src/services/ServiceService
)src/managers/ServiceManager
)[POST] /service/
endpoint for creating services using supertest (https://github.com/visionmedia/supertest)
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
Each category will have different placeholders for inputs:
e.g, hair styling: "Jane Doe's Barber Services", tutoring: "Jane Doe's Elementary School Tutoring"
Restrict ability to post service with id that doesn't match agent
field in payload
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
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
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.
MongoMemoryServer
mongoHelper.ts
and src/index.ts
to create an in-memory local database.Create some mock data files (typescript objects and arrays) (similar to the files in src/test/mock
).
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
.
chai
to make local HTTP requests that call our POST and PATCH endpoints.mock/CLIGen
and mock/MockGen
for inspiration.A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.