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.

81 lines
3.1 KiB

4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
3 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. ├── backend/
  6. ├── frontend/
  7. ├── nginx/
  8. ├── tools/
  9. ├── docker-compose.dev.yml
  10. └── docker-compose.prod.yml
  11. ```
  12. Consider them:
  13. **[backend/](https://github.com/doccano/doccano/tree/master/backend)**
  14. The `backend/` directory contains backend code. See [below](#Backend).
  15. **[frontend/](https://github.com/doccano/doccano/tree/master/frontend)**
  16. The `frontend/` 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 current code or removed:
  29. ```
  30. /
  31. ├── backend/
  32. ├── └── server/
  33. ```
  34. ## Backend
  35. The directory structure of the backend follows [Django](https://www.djangoproject.com) one.
  36. The important directories are as follows:
  37. ```
  38. /
  39. ├── backend/
  40. ├── ├── api/
  41. ├── ├── app/
  42. └── └── authentification/
  43. ```
  44. **[backend/api/](https://github.com/doccano/doccano/tree/master/backend/api)**
  45. The `backend/api` directory contains backend API application. We use [Django Rest Framework](https://www.django-rest-framework.org) to implement the API.
  46. If you want to add new API, change the contents of this directory.
  47. **[backend/app/](https://github.com/doccano/doccano/tree/master/backend/app)**
  48. The `backend/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).
  49. **[backend/authentification/](https://github.com/doccano/doccano/tree/master/backend/authentification)**
  50. The `backend/authentification` directory contains authentification application. It is mainly used for user signup.
  51. ## Frontend
  52. The `frontent` directory structure of the frontend follows [Nuxt.js](https://ru.nuxtjs.org) one.
  53. See the [Nuxt.js documentation](https://nuxtjs.org/guide/directory-structure/) for details.