Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
SPRING_PORT=8080
SPRING_DB_URL=jdbc:mysql://mysql-db:3306/dashnetdb
SPRING_DB_USERNAME=root
SPRING_DB_PASSWORD=thispasswordisnotsafe
SPRING_REPLICAS=1

spring-jpa-ddl-auto=update
spring-sql-init-platform=mysql
spring-sql-dialect=org.hibernate.dialect.MySQLDialect

MYSQL_PORT=3306
MYSQL_PASSWORD=thispasswordisnotsafe
MYSQL_ROOT_PASSWORD=thispasswordisnotsafe
MYSQL_DB_NAME=dashnetdb
MYSQL_REPLICAS=1

PMA_HOST=mysql-db
PMA_DB_PORT=3306
PMA_ARBITRARY=1
PMA_REPLICAS=1
PMA_PORT=8081

NODE_PORT=3000
NODE_REPLICAS=1

SWAGGER_EDITOR_PORT=81
SWAGGER_UI_PORT=82
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,6 @@ build/
node_modules/

### Mac OS ###
.DS_Store
.DS_Store

.env
32 changes: 31 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,25 @@ WELCOME

## Getting Started

REQUIREMENT:
[DOCKER](https://www.docker.com/products/docker-desktop/)

### Using docker compose:

#### Basic use
QA:
IN TERMINAL RUN FOLLOWING COMMAND

```bash
docker compose --profile QA up -d --build
```

WHEN DONE TURN OFF SERVICES

```bash
docker compose --profile QA DOWN
```

To start all services use `default` profile

```bash
Expand Down Expand Up @@ -40,11 +56,14 @@ docker compose --profile no-admin up -d --build # to run all services except php
Profiles: <br>

Run all services: `default` <br>
Run only services necessary for testing: `QA` <br>
React front-end: `react` <br>
MySQL: `mysql` <br>
Spring + MySQL: `spring-mysql` <br>
phpMyA + MySQL: `admin-mysql` <br>
Spring + phpMyA + MySQL: `spr-mysql-adm` <br>
Spring + Swagger + MySQL: `'swg-spr-mysql'` <br>
Spring + Swagger + phpMyA + MySQL: `'swg-spr-adm-mysql'` <br>
default but w/o myPHPAdmin: `no-admin` <br>

#### Restart service
Expand Down Expand Up @@ -82,4 +101,15 @@ Or w/ GUI you can go to:

## API documentation

Create [Swagger](https://swagger.io/)
In CLI start services profile `swg-spr-mysql` :

```bash
docker compose --profile swg-spr-mysql up -d --build
```

THEN in browser open following links: <br>
<br>
To read and use API documentation: [SWAGGER UI](http//localhost:81) <BR>
To edit API documentation: [SWAGGER__EDITOR](http//localhost:82)

OR open local [swagger.yml](swagger.yml) file:
157 changes: 157 additions & 0 deletions dashNet-swagger.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,157 @@
openapi: 3.0.3
info:
title: DashNET
description: DashNET modern project management dashboard
termsOfService: http://swagger.io/terms/
contact:
email: info@dashnet.com
license:
name: Apache 2.0
url: http://www.apache.org/licenses/LICENSE-2.0.html
version: 1.0.0_beta
externalDocs:
description: Find out more about Swagger
url: http://swagger.io
servers:
- url: https://localhost:8081
tags:
- name: Task
description: Everything about TASKS
paths:
/tasks:
get:
summary: Retrieve all users
description: Retrieves a list of all users in the system
responses:
'200':
description: A list of users
content:
application/json:
schema:
type: object
properties:
data:
type: array
items:
type: object
properties:
id:
type: integer
description: The unique identifier for the task
creatorId:
type: integer
description: The ID of the task creator
assigneeId:
type: integer
description: The ID of the task assignee
teamId:
type: integer
description: The ID of the team the task belongs to
commentTbId:
type: integer
description: The ID of the comment thread associated with the task
status:
type: integer
description: The status of the task
createdDate:
type: string
format: date
description: The date the task was created
deadlineDate:
type: string
format: date
description: The deadline date for the task
title:
type: string
description: The title of the task
description:
type: string
description: The description of the task

/tasks/title/{titleName}:
get:
summary: Get tasks by title
description: Retrieves tasks matching the provided title (using 'like' SQL operator)
parameters:
- name: titleName
in: path
required: true
schema:
type: string
description: The title to search for
responses:
'200':
description: Tasks matching the title
content:
application/json:
schema:
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/Task'
'404':
description: Tasks not found

/tasks/description/{description}:
get:
summary: Get tasks by description
description: Retrieves tasks matching the provided description (using 'like' SQL operator)
parameters:
- name: description
in: path
required: true
schema:
type: string
description: The description to search for
responses:
'200':
description: Tasks matching the description
content:
application/json:
schema:
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/Task'
'404':
description: Tasks not found

/tasks/count:
get:
summary: Get task count
description: Retrieves counts of different task statuses
responses:
'200':
description: Counts of different task statuses
content:
application/json:
schema:
type: object
properties:
data:
type: object
properties:
todo:
type: integer
description: Count of tasks to do
total:
type: integer
description: Total count of tasks
inProgress:
type: integer
description: Count of tasks in progress
notStarted:
type: integer
description: Count of tasks not started
done:
type: integer
description: Count of tasks done
status:
type: integer
description: Response status
'404':
description: Counts not found
Loading