You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

82 lines
3.0 KiB

4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
  1. # Project Structure
  2. The important files/directories are as follows:
  3. ```
  4. /
  5. ├── app/
  6. ├── frontend/
  7. ├── nginx/
  8. ├── tools/
  9. ├── docker-compose.dev.yml
  10. └── docker-compose.prod.yml
  11. ```
  12. Consider them:
  13. **[app/](https://github.com/doccano/doccano/tree/master/app)**
  14. The `app/api` directory contains backend code. See [below](#Backend).
  15. **[frontend/](https://github.com/doccano/doccano/tree/master/frontend)**
  16. The `app/api` directory contains frontend code. See [below](#Frontend).
  17. **[docker-compose.dev.yml](https://github.com/doccano/doccano/blob/master/docker-compose.dev.yml)**
  18. The `docker-compose.dev.yml` file contains [Docker Compose](https://docs.docker.com/compose) configuration to run a development environment.
  19. Once we run the command `docker-compose -f docker-compose.dev.yml up`, compose runs backend API and frontend development containers.
  20. **[docker-compose.prod.yml](https://github.com/doccano/doccano/blob/master/docker-compose.prod.yml)**
  21. The `docker-compose.prod.yml` file contains [Docker Compose](https://docs.docker.com/compose) configuration to run a production environment.
  22. 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.
  23. **[nginx](https://github.com/doccano/doccano/tree/master/nginx)**
  24. The `nginx` directory contains a NGINX configuration file and Docker container. They are used only in `docker-compose.prod.yml`.
  25. **[tools](https://github.com/doccano/doccano/tree/master/tools)**
  26. The `tools` directory contains some shell scripts. They are used for CI, CD and so on.
  27. Also, there are directories and files contain doccano v0.x codes.
  28. In the future, they will be integrated into the currect code or removed:
  29. ```
  30. /
  31. ├── app/
  32. ├── └── server/
  33. └── docker-compose.yml
  34. ```
  35. ## Backend
  36. The directory structure of the backend follows [Django](https://www.djangoproject.com) one.
  37. The important directories are as follows:
  38. ```
  39. /
  40. ├── app/
  41. ├── ├── api/
  42. ├── ├── app/
  43. └── └── authentification/
  44. ```
  45. **[app/api/](https://github.com/doccano/doccano/tree/master/app/api)**
  46. The `app/api` directory contains backend API application. We use [Django Rest Framework](https://www.django-rest-framework.org) to implement the API.
  47. If you want to add new API, change the contents of this directory.
  48. **[app/app/](https://github.com/doccano/doccano/tree/master/app/app)**
  49. 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).
  50. **[app/authentification/](https://github.com/doccano/doccano/tree/master/app/authentification)**
  51. The `app/authentification` directory contains authentification application. It is mainly used for user signup.
  52. ## Frontend
  53. The `frontent` directory structure of the frontend follows [Nuxt.js](https://ru.nuxtjs.org) one.
  54. See the [Nuxt.js documentation](https://nuxtjs.org/guide/directory-structure/) for details.