Git Product home page Git Product logo

central-frontend's Introduction

ODK Central Frontend

Platform License Build status

ODK Central is the ODK server. It manages user accounts and permissions, stores form definitions, and allows data collection clients like ODK Collect to connect to it for form download and submission upload. ODK Central Frontend provides the frontend for ODK Central using Vue.js.

This repository contains the code for the frontend of ODK Central. The central-backend repository contains the code for the backend API server. The central repository contains the Docker code for building and running a production Central stack. You can find release notes in the central repository.

The master branch of this repository reflects ongoing development for the next version of ODK Central. It may or may not be in sync with the master branch of the central-backend repository. For the latest stable version, see the release tags.

You can learn more about ODK Central by visiting the docs.

Contributing

We need your help to make ODK Central Frontend as useful as possible! Please see the Contribution Guide for detailed information on discussion forums, project policies, code guidelines, and an overview of the software architecture.

Setting up your development environment

First, install Node.js 14+.

Next, install dependencies by running npm install.

Install NGINX. Depending on your operating system and how you install NGINX, you may need to change the absolute paths in the development nginx.conf.

You will also need to set up ODK Central Backend. You will need to create a user using an ODK Central Backend command line script. You will probably also want to promote that user to a sitewide administrator.

Running in development

Follow these instructions to run ODK Central Frontend in development. For deploying to production, see the next section.

First, run ODK Central Backend.

Next, build ODK Central Frontend files for development by running npm run dev. The files will be outputted to dist/. As you update the source code, the files will be automatically rebuilt.

Finally, run NGINX by changing the working directory to the root directory of the repository, then typing the following:

nginx -c "$PWD/nginx.conf" -p "$PWD/dist/"

NGINX effectively places ODK Central Frontend and ODK Central Backend at the same origin, avoiding cross-origin requests. We specify -p "$PWD/dist/" so that relative paths in nginx.conf are relative to dist/.

ODK Central Frontend will be available on port 8989.

ODK Central Frontend communicates with ODK Central Backend in part using a session cookie. The cookie is Secure, but will be sent over HTTP on localhost. ODK Central Frontend also interacts with data collection clients and with services:

  • To upload an XLSForm, run pyxform-http. ODK Central Frontend communicates with pyxform-http through ODK Central Backend.
  • You can use ODK Collect to scan an app user QR code, download a form, and submit data. One option to do so is to use ngrok. ODK Central Frontend is available on port 8989, so you can run ngrok http 8989 to expose a temporary HTTPS URL that you can use. Within ODK Central Backend, you will also need to set the default.env.domain property in config/default.json to the HTTPS URL, then restart ODK Central Backend if it is already running.
  • Enketo is a web form engine used to show form previews and allow for web-based data entry. Please see our instructions for optionally setting up an Enketo server for use in development (it is already included in the production ODK Central stack).

Deploying to production

To build ODK Central Frontend files for production with minification, run npm run build. The files will be outputted to dist/. For more details on this command, see the documentation for Vue CLI.

Note that this repository's nginx.conf is for development only.

For more information on deploying to production, see the central repository.

central-frontend's People

Contributors

dependabot[bot] avatar florianm avatar issa-tseng avatar jniles avatar ktuite avatar lakshyagupta21 avatar lognaturel avatar matthew-white avatar yanokwa avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.