From 3035cd2b98918c0349d70f4c08d367e9d531eca5 Mon Sep 17 00:00:00 2001 From: Alexander Kurakin Date: Sat, 2 May 2020 20:24:36 +0300 Subject: [PATCH 1/3] Update project_structure.md --- docs/project_structure.md | 79 +++++++++++++++++++++------------------ 1 file changed, 43 insertions(+), 36 deletions(-) diff --git a/docs/project_structure.md b/docs/project_structure.md index 20144592..ab28a73b 100644 --- a/docs/project_structure.md +++ b/docs/project_structure.md @@ -1,70 +1,77 @@ # Project Structure -In doccano v1.x, the application consists of a frontend and backend API. They are stored in the `frontend` and `app` directories. +The important files/directories are as follows: ```bash -. -├── app +/ +├── app/ +├── frontend/ +├── nginx/ +├── tools/ ├── docker-compose.dev.yml -├── docker-compose.prod.yml -├── frontend -├── nginx -└── tools +└── docker-compose.prod.yml ``` -The other important files/directories are as follows: +Consider them: -- [docker-compose.dev.yml](https://github.com/doccano/doccano/blob/master/docker-compose.dev.yml) -- [docker-compose.prod.yml](https://github.com/doccano/doccano/blob/master/docker-compose.prod.yml) -- [nginx](https://github.com/doccano/doccano/tree/master/nginx) -- [tools](https://github.com/doccano/doccano/tree/master/tools) +**[app/](https://github.com/doccano/doccano/tree/master/app)** + +The `app/api` directory contains backend code. See [below](#Backend). + +**[frontend/](https://github.com/doccano/doccano/tree/master/frontend)** + +The `app/api` directory contains frontend code. See [below](#Frontend). **[docker-compose.dev.yml](https://github.com/doccano/doccano/blob/master/docker-compose.dev.yml)** -The `docker-compose.dev.yml` file contains configuration to run a development environment. Once we run the command `docker-compose -f docker-compose.dev.yml up`, compose runs backend API and frontend development containers. +The `docker-compose.dev.yml` file contains [Docker Compose](https://docs.docker.com/compose) configuration to run a development environment. +Once we run the command `docker-compose -f docker-compose.dev.yml up`, compose runs backend API and frontend development containers. **[docker-compose.prod.yml](https://github.com/doccano/doccano/blob/master/docker-compose.prod.yml)** -The `docker-compose.prod.yml` file contains configuration to run a production environment. We adopted the three tier architecture. Once we run the command `docker-compose -f docker-compose.prod.yml up`, compose builds frontend and runs DBMS, backend API and web server containers. +The `docker-compose.prod.yml` file contains [Docker Compose](https://docs.docker.com/compose) configuration to run a production environment. +We adopted the three tier architecture. Once we run the command `docker-compose -f docker-compose.prod.yml up`, compose builds frontend and runs DBMS, backend API and web server containers. **[nginx](https://github.com/doccano/doccano/tree/master/nginx)** -The `nginx` directory contains a nginx configuration file and Docker container. They are used only in `docker-compose.prod.yml`. +The `nginx` directory contains a NGINX configuration file and Docker container. They are used only in `docker-compose.prod.yml`. **[tools](https://github.com/doccano/doccano/tree/master/tools)** The `tools` directory contains some shell scripts. They are used for CI, CD and so on. -## Frontend - -The directory structure of the frontend follows Nuxt.js one. See the Nuxt.js documentation for details: +## Backend -- [Nuxt.js/Directory Structure](https://nuxtjs.org/guide/directory-structure/) - -## Backend API - -The directory structure of the backend api follows Django one. The important directories are as follows: +The directory structure of the backend follows [Django](https://www.djangoproject.com) one. +The important directories are as follows: ```bash -. -├── api -├── app -├── authentification -└── server +/ +├── app/ +├── ├── api/ +├── ├── app/ +├── ├── authentification/ +└── └── server/ ``` -**[app/api](https://github.com/doccano/doccano/tree/master/app/api)** +**[app/api/](https://github.com/doccano/doccano/tree/master/app/api)** + +The `app/api` directory contains backend API application. We use [Django Rest Framework](https://www.django-rest-framework.org) to implement the API. +If you want to add new API, change the contents of this directory. -The `api` directory contains backend API application. We use Django Rest Framework to implement the API. If you want to add new API, change the contents of this directory. +**[app/app/](https://github.com/doccano/doccano/tree/master/app/app)** -**[app/app](https://github.com/doccano/doccano/tree/master/app/app)** +The `app/app` directory contains Django project settings. See [Writing your first Django app, part 1](https://docs.djangoproject.com/en/3.0/intro/tutorial01/#creating-a-project). -The `app` directory contains Django project settings. See [Writing your first Django app, part 1](https://docs.djangoproject.com/en/3.0/intro/tutorial01/#creating-a-project). +**[app/authentification/](https://github.com/doccano/doccano/tree/master/app/authentification)** -**[app/authentification](https://github.com/doccano/doccano/tree/master/app/authentification)** +The `app/authentification` directory contains authentification application. It is mainly used for user signup. -The `authentification` directory contains authentification application. It is mainly used for user signup. +**[app/server/](https://github.com/doccano/doccano/tree/master/app/server)** -**[app/server](https://github.com/doccano/doccano/tree/master/app/server)** +The `app/server` directory contains doccano v0.x codes. In the future, this directory will be integrated into the `api` directory. + +## Frontend -The `server` directory contains doccano v0.x codes. In the future, this directory will be integrated into the `api` directory. +The `frontent` directory structure of the frontend follows [Nuxt.js](https://ru.nuxtjs.org) one. +See the [Nuxt.js documentation](https://nuxtjs.org/guide/directory-structure/) for details. From 649fce2edec4426837adb12a25d529713dc6dbd2 Mon Sep 17 00:00:00 2001 From: Alexander Kurakin Date: Mon, 18 May 2020 19:00:56 +0300 Subject: [PATCH 2/3] Mention v0.x files in a right way (#784) --- docs/project_structure.md | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/docs/project_structure.md b/docs/project_structure.md index ab28a73b..7ece9c27 100644 --- a/docs/project_structure.md +++ b/docs/project_structure.md @@ -2,7 +2,7 @@ The important files/directories are as follows: -```bash +``` / ├── app/ ├── frontend/ @@ -40,18 +40,27 @@ The `nginx` directory contains a NGINX configuration file and Docker container. The `tools` directory contains some shell scripts. They are used for CI, CD and so on. +Also, there are directories and files contain doccano v0.x codes. +In the future, they will be integrated into the currect code or removed: + +``` +/ +├── app/ +├── └── server/ +└── docker-compose.prod.yml +``` + ## Backend The directory structure of the backend follows [Django](https://www.djangoproject.com) one. The important directories are as follows: -```bash +``` / ├── app/ ├── ├── api/ ├── ├── app/ -├── ├── authentification/ -└── └── server/ +└── └── authentification/ ``` **[app/api/](https://github.com/doccano/doccano/tree/master/app/api)** @@ -67,10 +76,6 @@ The `app/app` directory contains Django project settings. See [Writing your firs The `app/authentification` directory contains authentification application. It is mainly used for user signup. -**[app/server/](https://github.com/doccano/doccano/tree/master/app/server)** - -The `app/server` directory contains doccano v0.x codes. In the future, this directory will be integrated into the `api` directory. - ## Frontend The `frontent` directory structure of the frontend follows [Nuxt.js](https://ru.nuxtjs.org) one. From bb530cc476437a6fbb849387cfc245139cca23d2 Mon Sep 17 00:00:00 2001 From: Alexander Kurakin Date: Fri, 22 May 2020 09:42:22 +0300 Subject: [PATCH 3/3] Fix --- docs/project_structure.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/project_structure.md b/docs/project_structure.md index 7ece9c27..c7615f97 100644 --- a/docs/project_structure.md +++ b/docs/project_structure.md @@ -47,7 +47,7 @@ In the future, they will be integrated into the currect code or removed: / ├── app/ ├── └── server/ -└── docker-compose.prod.yml +└── docker-compose.yml ``` ## Backend