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.

71 lines
3.0 KiB

4 years ago
  1. # Project Structure
  2. In doccano v1.x, the application consists of a frontend and backend API. They are stored in the `frontend` and `app` directories.
  3. ```bash
  4. .
  5. ├── app
  6. ├── docker-compose.dev.yml
  7. ├── docker-compose.prod.yml
  8. ├── frontend
  9. ├── nginx
  10. └── tools
  11. ```
  12. The other important files/directories are as follows:
  13. - [docker-compose.dev.yml](https://github.com/doccano/doccano/blob/master/docker-compose.dev.yml)
  14. - [docker-compose.prod.yml](https://github.com/doccano/doccano/blob/master/docker-compose.prod.yml)
  15. - [nginx](https://github.com/doccano/doccano/tree/master/nginx)
  16. - [tools](https://github.com/doccano/doccano/tree/master/tools)
  17. **[docker-compose.dev.yml](https://github.com/doccano/doccano/blob/master/docker-compose.dev.yml)**
  18. 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.
  19. **[docker-compose.prod.yml](https://github.com/doccano/doccano/blob/master/docker-compose.prod.yml)**
  20. 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.
  21. **[nginx](https://github.com/doccano/doccano/tree/master/nginx)**
  22. The `nginx` directory contains a nginx configuration file and Docker container. They are used only in `docker-compose.prod.yml`.
  23. **[tools](https://github.com/doccano/doccano/tree/master/tools)**
  24. The `tools` directory contains some shell scripts. They are used for CI, CD and so on.
  25. ## Frontend
  26. The directory structure of the frontend follows Nuxt.js one. See the Nuxt.js documentation for details:
  27. - [Nuxt.js/Directory Structure](https://nuxtjs.org/guide/directory-structure/)
  28. ## Backend API
  29. The directory structure of the backend api follows Django one. The important directories are as follows:
  30. ```bash
  31. .
  32. ├── api
  33. ├── app
  34. ├── authentification
  35. └── server
  36. ```
  37. **[app/api](https://github.com/doccano/doccano/tree/master/app/api)**
  38. 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.
  39. **[app/app](https://github.com/doccano/doccano/tree/master/app/app)**
  40. 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).
  41. **[app/authentification](https://github.com/doccano/doccano/tree/master/app/authentification)**
  42. The `authentification` directory contains authentification application. It is mainly used for user signup.
  43. **[app/server](https://github.com/doccano/doccano/tree/master/app/server)**
  44. The `server` directory contains doccano v0.x codes. In the future, this directory will be integrated into the `api` directory.