The application is built using the Django web framework
There will be a frontend for normal users and backend for administrators.
The backend is gives an overview of the whole system and provides restricted functionality
such as new users creation and a detailed view of all the data in the application
The application has 3 user levels
- Admins -> Have access to the backend
- User -> Normal users with only access to the frontend
- Client -> Represents a client team member and cannot Login.
The application will sync data with Gsuite by periodically querying the Google Drive, Sheets and Doc APIs
Here is a sync process flow that would pull in all the data at a given data.
-
Check if the top level GDrive folder (root) has been updated since the last check
-
If Yes, Loop through all folders in the root folder to identify new changes or new clients
- new found clients will create a Client entry in the db.
- existing clients will be identified using the unique folder ID from google drive
-
In client’s folders that have changes
- Check for GSheets that contains a string in their filename (PCB Design) to identify new sheets
- this will create a Sheet then a Project entry in the database
- a snapshot of the sheet rows will also be saved including a version number from google drive - Check for sheets that have been updated since the last check using the version number
- Check for updates to Client Google Doc using Google Sheets API and Save new changes into Status entry into the database
- Check for GSheets that contains a string in their filename (PCB Design) to identify new sheets
-
For sheets that have been updated, Retrieve and create a new snapshot in the app
This involves querying all the rows using Google Sheets API and creating Row entries in the DB
For GitHub Latest updates, the app will use webhooks to receive the updates from github and save to the Commits table
name
email
password
access_level ADMIN | USER | CLIENT
status
name str
ref str
name str
logo image
ref GDrive Folder ID
doc fk Client
user fk User
client fk Client
person fk Member
created datetime
message text
name str
ref str
number int
sheet fk Sheet
update_at datetime
version fk Version
ee bool
me bool
fw bool
sch bool
lay bool
rfq bool
name str
client fk Client
sheet fk Sheet
update str
created_at datetime
project fk Project
author
date
message
revision
From the data retrieved through syncronization,
Queries are used to generate the tables and any other reports on the frontend pages
-
Which authentication method to use with Google Drive Api
Whether to use a google service account with G Suite Domain-wide Delegation or Just normal Oauth -
Efficient way to track changes to all files in the root folder for all clients
Whether to use Changes Collection to track changes to the drive files or Just poll and check the version number changes