Code test submission for SkoolBag.
Live demo of this project can be found here
Requirements:
- Node V10
- MongoDB
To install dependencies and run development server:
npm install
npm run deploy
- There is no interface for modifying existing documents. (can be implemented)
- Name based filtering checks to see if the name starts with the provided value and is case insensitive.
- Address based filtering checks to see if the address contains the provided value and is case insensitive.
- Filtering is done on the frontend after receiving all the school documents and would not scale well for extremely large datasets.
- Input validation is only conducted on the frontend.
npm run test
Components:
- add-school component provides the ui for adding new schools. (src/app/components/add-school/)
- list-schools component provides the ui for viewing and filtering schools. (src/app/components/list-schools/)
- text-input component is a utility component used to maximize code reuse for user input handling (src/app/components/text-input/)
Services:
- schools service is used as the interface with the backend for both fetching, adding and deleting school documents (src/app/services/schools.service.ts)
- Backend is implemented as a simple express server. (server.js)
- CRUD api is implemented as a RESTful api. (src_api/endpoints.js)
- Database schema is defined using mongoose using mongoose as the driver (src_api/db/schools.js)