The Data Discovery Engine (DDE) is a project designed to promote the principles of FAIR (Findable, Accessible, Interoperable, Reusable) data sharing practices. Recognizing the importance of well-structured and easily discoverable data in advancing scientific research and technological development, this initiative advocates for the widespread adoption of schema.org schemas. By leveraging schema.org’s rich vocabulary for structured data and providing tools to easily extend this vocabulary to fit your research goals, the project aims to make biomedical research easily finable by humans and machines alike. The DDE does this by providing a comprehensive set of tools for data creators to annotate their datasets effectively, extend schemas easily and share your metadata efficiently. The ultimate goal is adopting FAIR data sharing practices enables data to be easily indexed by search engines like Google. This enhances the discoverability of datasets, making it simpler for researchers, developers, and other stakeholders to find relevant data quickly.
To run the DDE API you will need to create some credentials, this file is not included and must be created by you. Once that's complete you can choose to run the API with Docker or run the DDE code locally.
At the top level of the repository create a file config_key.py with:
```bash
COOKIE_SECRET = '<Any Random String>'
GITHUB_CLIENT_ID = '<your Github application Client ID>'
GITHUB_CLIENT_SECRET = '<your Github application Client Secret>'
```
Follow this instruction to create your Github Client ID and Secret.
The following commands should be issued under the first level project folder.
Make sure port 8000
is not in use when starting the containers.
Note: You can build the complete application with Docker and choose to run the frontend in either development mode or production mode (default). The main difference is that in production mode, the frontend code is not editable, and what you see in the browser reflects a compiled build.
cd docker
WEB_APP_MODE=production docker compose up --detach
cd docker
WEB_APP_MODE=development docker compose -f docker-compose.yml -f docker-compose.override.yml up --detach
NOTE: If at some point you wish to switch from one version to another you must stop the container and remove all images associated and rebuild the project to avoid issues.
To remove the container and its images run this command:
docker compose down --rmi all
docker compose stop
docker compose start
docker compose exec web git pull
docker compose down
-
Install Elasticsearch at localhost:9200 (follow this instruction)
-
Clone this repo
git clone https://github.com/biothings/discovery-app.git
-
Install system packages (on Ubuntu, for example)
sudo apt install libcurl4-openssl-dev libssl-dev
-
Change directory to project folder
cd discovery-app
-
Install python dependencies
It's recommended to set up a Python virtual environment first.
pip install -r requirements.txt
-
Run dev server
python index.py --debug
You should now be able to access the homepage at http://localhost:8000/
The web frontend is a server side rendered application built using Nuxt3.
A Nuxt3 Web SSR (Server-Side Rendering) application works by running its own Node.js server to handle requests and render pages on the server side. When a user requests a page, the Nuxt3 Node server processes the Vue components, fetches any required data, and generates fully rendered HTML, which is sent to the client. Look at the nuxt 3 documentation to learn more.
Go to project folder
note Node version needed.
Make sure to install the dependencies with your preferred method:
# yarn
yarn install
OR
# npm
npm install
OR
# pnpm
pnpm install --shamefully-hoist
Start the development server on http://localhost:3000
npm run dev
Build the application for production:
npm run build
Locally preview production build:
npm run preview
Checkout the deployment documentation for more information.
To test some functionality in the web app the frontend requires authentication and we need the API to handle this without any CORS issues, to do so we need a proxy server to delegate requests to our two running services.
In the production environment, this setup functions as follows: an Nginx server is required to manage incoming HTTP requests and route them appropriately to their respective services. The application architecture consists of two separate servers: one for the backend API, built with Python, typically running on port 8000, and another for the frontend, built with Node.js, running on port 3000. Nginx acts as a reverse proxy, directing requests to the correct service based on the URL path or other routing rules. This setup ensures efficient request handling, load balancing, and secure communication between the frontend and backend services.
Run both services locally as described above. If you chose to run all services through Docker: Docker will run all the services needed. Please refer to the instructions above for that configuration.
Run Nginx with the configuration file here.
You should now be able to access both services at http://localhost/
biothings_schema
is a Python package for the creation, extension and exploration of the schemas defined using the schema.org standard.