- Go 55.9%
- TypeScript 42.8%
- JavaScript 0.7%
- Go Template 0.3%
- CSS 0.1%
- Other 0.1%
| apps | chore: codeberg | |
| charts/app | chore: codeberg | |
| tests/smoke | chore: codeberg | |
| .gitignore | chore: codeberg | |
| .nvmrc | chore: codeberg | |
| catalog-info.yaml | chore: codeberg | |
| docker-compose.yml | chore: codeberg | |
| mkdocs.app.yml | chore: codeberg | |
| mkdocs.yml | chore: codeberg | |
| package.json | chore: codeberg | |
| playwright.config.ts | chore: codeberg | |
| pnpm-lock.yaml | chore: codeberg | |
| pnpm-workspace.yaml | chore: codeberg | |
| README.md | chore: codeberg | |
| renovate.json | chore: codeberg | |
| requirements-techdocs.txt | chore: codeberg | |
| tsconfig.base.json | chore: codeberg | |
| turbo.json | chore: codeberg | |
MORIS
MORIS (Modular Research Information System) is a comprehensive backend and frontend solution designed to streamline the management of research project information. It facilitates the integration of project details, contributors, and related identifiers, serving as a central hub for research metadata.
Table of Contents
- Project Overview
- Prerequisites
- Development Environment Setup
- Production Environment Setup
- Database Migrations
- Contributing
Project Overview
MORIS connects various research infrastructure services to provide a unified view of research projects. The system is split into a Go-based backend API (apps/backend) and a React-based frontend (apps/frontend), managed as a monorepo using Turbo.
Prerequisites
Before you begin, ensure you have the following installed:
- nvm (for managing Node.js versions)
- pnpm (Package Manager)
- Go (1.25.4 or later)
- Python 3 (for local TechDocs/MkDocs builds)
- wgo (Live reload for Go development)
- swag (Swagger documentation generator)
- turbo (Repo management)
- podman (Container management)
- atlas (Database migration tool)
Development Environment Setup
Follow these steps to set up a local development environment.
Initial Setup
-
Clone the repository:
git clone <repository-url> cd MORIS -
Setup Node.js environment:
nvm use pnpm install -
Initialize Backend: Download Go dependencies and generate Ent definitions and Swag documentation:
cd apps/backend go get ./... pnpm run api:generate
Backend Configuration
Create the backend environment file and configure the defaults.
-
Create
.env:# Assuming you are still in apps/backend cp .env.example .env -
Configure
.env: Update the file with the following development defaults:# App Configuration APP_ENV=dev PORT=8080 JWT_SECRET=this0is1a2secret # Database (PostgreSQL) DB_HOST=localhost DB_PORT=8765 DB_USER=moris DB_PASSWORD=moris DB_NAME=moris # Redis Cache CACHE_HOST=localhost CACHE_PORT=6380 CACHE_PASSWORD=moris CACHE_USER= # ORCID Integration ORCID_CLIENT_ID= ORCID_CLIENT_SECRET= ORCID_REDIRECT_URL=http://127.0.0.1:3000/orcid-callback ORCID_SANDBOX=true # Crossref Integration CROSSREF_USER_AGENT=MORIS/1.0 (https://github.com/SURF-Innovatie/MORIS) CROSSREF_MAILTO=your_email@example.com CROSSREF_BASE_URL=https://api.crossref.org # RAiD Integration RAID_API_URL=https://api.demo.raid.org.au/ RAID_AUTH_URL=https://auth.demo.raid.org.au/realms/RAiD/protocol/openid-connect/token RAID_USERNAME= RAID_PASSWORD= # Zenodo Integration ZENODO_CLIENT_ID= ZENODO_CLIENT_SECRET= ZENODO_REDIRECT_URL=http://127.0.0.1:3000/zenodo-callback ZENODO_SANDBOX=true # SURFconext (OpenID Connect) Integration SURFCONEXT_ISSUER_URL= SURFCONEXT_CLIENT_ID= SURFCONEXT_CLIENT_SECRET= SURFCONEXT_REDIRECT_URL=http://127.0.0.1:3000/surfconext-callback SURFCONEXT_SCOPES=
Frontend Configuration
Install dependencies and configure the frontend environment.
-
Initialize Frontend:
cd ../frontend pnpm install pnpm run api:generate -
Configure
.env:cp .env.example .envUpdate the file content:
# App Name VITE_APP_NAME="MORIS" # API URL (Backend endpoint) VITE_API_BASE_URL=/api
Infrastructure & Seeding
-
Start Services: Spin up the database and Redis containers using Podman from the root directory:
cd ../.. podman compose up -d -
Seed Database (Optional): If you need dummy data for development:
cd apps/backend pnpm run db:seed cd ../.. -
Add Admin User (if you skipped seeding the database)
cd apps/backend pnpm run db:add-admin --email="verify_admin@example.com" --name="Verify Admin" --password="password123" cd ../..
Running the Application
Start the development server. This runs both the backend (with hot-reload via wgo) and the frontend (via Vite) concurrently:
# From the root directory
pnpm run dev
- Frontend:
http://127.0.0.1:3000 - Backend API:
http://localhost:8080 - API Docs:
http://localhost:8080/swagger/index.html
Running TechDocs Locally
MORIS can also serve the TechDocs site through the frontend origin at /docs.
Create the local docs virtualenv once:
pnpm docs:setup
Run the docs server in a second terminal:
pnpm docs:serve
Then open:
http://127.0.0.1:3000/docs
The frontend Vite dev server proxies /docs to the local MkDocs server on port 3001.
To generate the static docs output used in CI and the frontend container image:
pnpm docs:build
Production Environment Setup
Coming Soon
The production environment setup is currently under development. It will utilize optimized Docker images for both the backend and frontend services.
Database Migrations
MORIS uses Atlas for versioned database migrations with Ent.
Prerequisites
- Atlas CLI installed (
brew install ariga/tap/atlasorcurl -sSf https://atlasgo.sh | sh) - Docker/Podman running (for the dev database used in schema diffing)
Generating Migrations
After modifying ent schemas in apps/backend/ent/schema/, generate a new migration:
cd apps/backend
pnpm run db:migrate:diff <migration_name>
This creates timestamped SQL files in apps/backend/ent/migrate/migrations/.
Applying Migrations
Apply pending migrations to your database:
cd apps/backend
pnpm run db:migrate:apply
Checking Migration Status
View which migrations have been applied:
cd apps/backend
pnpm run db:migrate:status
Contributing
Please read our contributing guidelines before submitting a Pull Request.
Reporting Issues
- Use the Bug Report template for bugs.
- Use the Feature Request template for suggestions.
Pull Requests
- Use the Pull Request Template when opening a PR.
- Ensure all checks pass (
pnpm lint,pnpm build).