Dear Nimiq Community, we want to build an directory for all shops that accept NIM. This directory should have an open API and be open source for others to build on. Thus, we are looking for a developer who has the time and skills to develop this project according to the following requirements:
Requirements
- CRUD restful API for accessing shops, supporting both online and brick and mortar
- Bulk Imports, e.g. via CSV
- Basic UI for adding and updating shops manually
The goal of the backend is make it possible to build following frontends on top of it:
- A map that displays locations of physical stores that accept NIM.
- A directory of online shops / merchants that accept NIM.
- Search function to easily find shops.
- Merchants can easily add their shops themselves.
- Merchants can, temporarily display additional info such as promos
Architecture and DB
As a rough architecture, we suggest building a back-end service that offers REST web services for platforms and services that want to show data from the shop directory. The service itself should then store that information in a standard SQL back-end (SQL is optional, it could also be a document based DB as long as it supports all search features), support the basic CRUD functions with minimal UIs to get started and in a later version also bulk imports.
Milestones
1. Database scheme
Should be in “vanilla SQL” so that the service can run with any SQL database
The scheme should be created in collaboration with Team Nimiq, we will define a point of
contact, could be Sven and/or also Maestro; the schema needs to acknowledge physical
shops (latitude/longitude) as well as online shops and for the latter, the reach is
important, i.e. the countries they ship to; general metadata is needed as well as what
range of goods are offered; linking shops to listings on Google Maps is just an idea here
but would be great because it would allow to automatically get metadata such as
opening hours.
2. CRUD web services
A first version can be read-only, but on the long-run, it should be possible for external
providers to add shops to the system; we think standard REST services using JSON
would be great as they are basically industry standard; we don’t have restrictions on
what technology to be used per se, as long as it’s open source and industry standard
(we want to make sure other developers can extend and modify the code).
3. Minimalistic UIs to use CRUD services
Some minimalistic UIs so that we can feed and update the system with data manually in
the beginning. Ideally, these UIs can be generated automatically from the DB schema
4. Search function
The APIs need to provide an endpoint to search for shops based on their metadata such
as location/area and range of goods offered. Could also be done later, when we have
several shops in the system.
5. Bulk import
A bulk import will be needed later this year, but there’s no rush, we would first need to
define the exact format. But in general, we expect it to be based on CSV, JSON could be
an option, too. Let’s sync on that before starting implementing anything.
The entire proposal including milestones is flexible and we would love to hear your feedback — but we would expect the resulting code to be submitted as one PR per milestone to a repository that will be provided on GitHub, but that’s not set in stone yet. If you know how, then having the entire service ready to be deployed with Docker would be a plus. While we think that SQL and REST are the best technology choices for this implementation, we’re also open to considering a GraphQL endpoint or using a document-oriented database instead of SQL.
Budget
$3000 in NIM or BTC
Timeline
2 months
[Edit Mar 21, 2022: The first version has been delivered by @Stefan today. He shared the work with a friend of his and they will now share the reward of $3000! Thank you very much for the work!! The code can be found here. We will now be working on making the API available for the public.]