3.0 KiB
Project Structure
In doccano v1.x, the application consists of a frontend and backend API. They are stored in the frontend
and app
directories.
.
├── app
├── docker-compose.dev.yml
├── docker-compose.prod.yml
├── frontend
├── nginx
└── tools
The other important files/directories are as follows:
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.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 nginx
directory contains a nginx configuration file and Docker container. They are used only in docker-compose.prod.yml
.
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 API
The directory structure of the backend api follows Django one. The important directories are as follows:
.
├── api
├── app
├── authentification
└── server
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.
The app
directory contains Django project settings. See Writing your first Django app, part 1.
The authentification
directory contains authentification application. It is mainly used for user signup.
The server
directory contains doccano v0.x codes. In the future, this directory will be integrated into the api
directory.