This is a Dockerized Task-tracker app, using PHP / Laravel
-
PHP version:- 8.1.6
-
Laravel version:- 9.19
- a clone of this repo on your machine
- Docker
- clone the project and setup the env file
git clone https://github.com/mohamedspicer/task-tracker
cd task-tracker
-
rename the .env-example to .env and edit the environment variable as you like
-
run the docker-compose
docker-compose up -d
- the application
- mysql
/api/v1/
Verifies that application is up and running.
{
"status": 1,
"message": "Task-Tracker is runnig",
"data": null
}
/user/register
Creates a new user by register.
{
"email": "test123@test.com",
"password": "1234567",
"password_confirmation": "1234567",
"is_admin": 1,
"name": "Test User"
}
{
"status": 1,
"message": "User Registers succefully",
"data": {
"user": {
"email": "test123@test.com",
"is_admin": 1,
"name": "Test User",
"updated_at": "2022-08-28T17:42:58.000000Z",
"created_at": "2022-08-28T17:42:58.000000Z",
"id": 2
},
"token": "3|4I88V1vcMdOJy9J7EybXMsinXfWLqX0ytkGEvRsf"
}
}
/user/login
user login and retrieve token.
{
"email": "test123@test.com",
"password": "1234567",
}
{
"status": 1,
"message": "User Logged",
"data": {
"user": {
"id": 1,
"name": "Mohamed",
"email": "test123@com.com",
"email_verified_at": null,
"created_at": "2022-08-28T16:49:21.000000Z",
"updated_at": "2022-08-28T16:49:21.000000Z",
"is_admin": 0
},
"api_token": "6|dAYhLX3HNNNFr5KUSUCFfNDXUkNbst04r9pb2iV2"
}
}
/user/logout
user logout and revoke his tokens.
{
"status": 1,
"message": "Logout successfully",
"data": null
}
/projects/all
Displays all projects that admin created (Allowed for admins only)
{
"status": 1,
"message": "All projects admin created",
"data": [
{
"id": 1,
"title": "titleProject",
"description": "description Project"
},
{
"id": 2,
"title": "titleProject1",
"description": "description Project1"
},
{
"id": 3,
"title": "titleProject2",
"description": "description Project2"
}
]
}
/projects/create
Create new project (Allowed for admins only)
{
"title": "titleProject",
"description": "description Project"
}
{
"status": 1,
"message": "project created succefully",
"data": null
}
/projects/update/{id}
Update existing project (Allowed for admins only)
{
"title": "editedTitleProject",
}
{
"status": 1,
"message": "Project updated successfully",
"data": null
}
/projects/delete/{id}
Delete existing project (Allowed for admins only). if project contains tasks the project will not deleted
{
"status": 1,
"message": "Project deleted successfully",
"data": null
}
/tasks/all
Displays all tasks that admin created for specific project (Allowed for admins only)
{
"project_id": 2
}
{
"status": 1,
"message": "All tasks",
"data": [
{
"id": 1,
"title": "title task",
"description": "description task",
"project_id": 2,
"assigned_to": 1,
"created_at": "2022-08-28T18:28:20.000000Z",
"updated_at": "2022-08-28T18:28:20.000000Z",
"submitted": 0
}
]
}
/tasks/userTasks
User Tasks which assigned to him (Allowed to users)
{
"status": 1,
"message": "All tasks",
"data": [
{
"id": 2,
"title": "title task",
"description": "description task",
"project_id": 2,
"assigned_to": 1,
"created_at": "2022-08-28T18:28:28.000000Z",
"updated_at": "2022-08-28T18:28:28.000000Z",
"submitted": 0
}
]
}
/tasks/update/{id}
Update existing task (Allowed for admins only)
{
"title": "editedTitleTask",
}
{
"status": 1,
"message": "Task updated successfully",
"data": null
}
/tasks/delete/{id}
Delete existing task (Allowed for admins only).
{
"status": 1,
"message": "Project deleted successfully",
"data": null
}
/tasks/submit/{id}
Submit task (Allowed for user).
{
"status": 1,
"message": "Task submitted succesfully",
"data": null
}