This is a mock back end for InterNations' Front End challenge. It uses JSON Server and deployed to https://int-be.herokuapp.com/. To run it locally:
npm start
For the front-end counterpart, please see http://github.com/dvkndn/int-fe.
For the challenge, the mock back end serves 2 simple models:
interface Group {
id: string;
name: string;
/* ... */
}
interface User {
id: string;
email: string;
/* ... */
}
For detailed structures and implementations, please see db.js.
To represent the concept that a user may belong to several groups, and a group may have several users, the back end also implemented a simple many-to-many model:
interface Link {
id: string;
groupId: string;
userId: string;
}
Thanks to the versatility of JSON Server, the 3 models should be enough to server most, if not all, cases of the challenge.