This is a REST API for the task.it application written in Python using the Flask framework. A PostgreSQL database is used for persisting user data, and Firebase is used for authentication. The SQLAlchemy ORM is used for handling interactions with the database. The REST API and Postgres Database instance are hosted on Heroku. Postman was used for testing the REST API.
The following models are defined in the ORM:
Fields: id (primary key), userUID (from Firebase), username, firstname, lastname
Fields: id (primary key), date_added, userUID (from Firebase), title, description, tasks (Task[]), task_categories (TaskCategory[])
Fields: id (primary key), date_added, title, description, project_id (Foreign key to id column of Projects table), status, task_category_name, task_category_color, created_by (UID from Firebase), completed_at_time, completed_by (UID from Firebase)
Fields: id (primary key), name, color, project_id (Foreign key to id column of Projects table)
Fields: id (primary key), project_id (Foreign key to id column of Projects table), userUID (from Firebase)
The significant API endpoints are:
GET or POST requests to get UserInfo or create new UserInfo entry on sign-up.
GET UserInfo from the unique user_id of a user provided by Firebase during login or sign-up.
Search for a user's info by their username. Full-text search based on the query in the search string using TS Vectors.
Update the username in the UserInfo of the user with unique id user_uid.
GET or POST requests to get all projects or create a new project using data included in the request body.
GET all projects for a particular user with unique id user_uid.
GET a particular project based on its id.
GET a JSON Array of all the tasks added to a project. Send a POST request to add a new Task to a project given by project_id based on data sent in the request body.
Change the status of a particular task to Complete.
Change the status of a particular task to Pending.
Delete a particular task from a project.
Edit the information of a task like name, description, category, etc.
GET all the Task Categories associated with a project or POST to add a new Task Category to a project based on the request body.
Delete a particular task category from a project.
Get the number of tasks completed by a particular user on each day in the last 7 days.
Get the total tasks, completed tasks, and total projects for a particular user.
Get the total tasks and completed tasks for each of the five most recent projects a user has created.
Check if a user with a particular username already exists or not.
GET all collaborators on a project, POST to add a new collaborator to a project, or DELETE a collaborator from a project.
GET all projects a particular user is collaborating on.
Check if a user is a collaborator on a particular project or not.
GET all the other users a particular user has collaborated with.
This REST web service serves data to a frontend web application made with React. See the frontend source code here or visit the deployed version.
The essential features of the platform can be accessed on the go using the task.it mobile app built with Flutter.
This application is developed by Saarthak Gupta © 2023.