Home to the opus-tm Django REST API
This API serves our React Web App
For the time-being, please do not register any more users unless testing email invitation/registration - Management
- test
- dvader
- lukeskywalker
- leiaskywalker
- Test
- The Dark Side
- /currentUser/
- /addUsers/
- /users/
- /users/<userId>/
- /userDetails/<username>/
- /userEmailDetails/<userEmail>/
- /cliques/
- /cliques/<cliqueId>/
- /cliqueDetails/<cliqueName>/
- /cliqueMembers/<cliqueName>/
- /invitations/
- /invitation/<invitationId>/
- /invitationDetails/<inviteeEmail>/
- /userInvitations/<username>/
- /requests/
- /requests/<requestId>/
- /cliqueRequests/<cliqueName>/
- /events/
- /events/<cliqueEventId>/
- /cliqueEvents/<cliqueName>/
- /schedules/
- /schedules/<scheduleId>/
- /userSchedules/<username>/
- /timeframes/
- /timeframes/<timeFrameId>/
- /scheduleTimeFrames/<scheduleId>/
- /announcements/
- /announcements/<announcementId>/
- /cliqueAnnouncements/<cliqueName>/
- /directMessages/
- /directMessages/<directMessageId>/
- /userDirectMessagesSent/<username>/
- /userDirectMessagesRecieved/<username>/
- /cliqueMessages/
- /cliqueMessages/<cliqueMessageId>/
- /cliqueCliqueMessages/<cliqueName>/
- /reactions/
- /reactions/<reactionId>/
- /toDos/
- /toDos/<toDoId>/
- /userToDos/<username>/
- /tokenAuth/
- /admin/
For now we have stuck to Heroku for the sake of familiarity. Future plans possibly include deplyment on AWS. To ensure that we always have a working build, we also deploy a staging build to use in development: Staging Build
PostgreSQL. We mainly decided on this because of the ease of access with Heroku. However, we are also able to configure Django to run SQLite when testing locally. The pros and cons of each are described well in this article
Django enables the creation of database model objects in python. Once each model is created, Django automatically creates migrations in which it can create, update, and generate SQL to add to the database based on the python models. The structure of the database is depicted in model.py:
A diagram of this django model as generated by GraphViz: Diagram to come
Found at the /admin route of the API. After logging into an admin account, a site administrator can easily manage the database tables without the need to write any SQL. Read more here
Alongside Django REST we also use JSON-Web Token authentication for secure data transfer. We decided to implement this because it has been an IETF standard in the defined by the RFC7519 since 2015.
We set up a white-list to only allow certain clients make requests to the API. This helps to make sure that only our React app will have access to the database.