Skip to content

hypha-dao/hypha-web

Repository files navigation

Hypha DHO Web Platform v3

GitHub package.json version (subfolder of monorepo) Discord

HyphaPlatform

Architecture

Applications

Packages

  • api: Packages to integrate relevant systems via API
  • authentication: Package that handles authentication functionality
  • cookie: Package that hosts the cookie integration
  • core: Core functionality and business logic
  • epics: Package for managing epics functionality
  • feature-flags: Package for managing feature flags
  • i18n: Package that hosts the internationalisation configuration and helpers
  • model: Data models and type definitions
  • storage-evm: EVM storage implementation
  • storage-postgres: PostgreSQL storage implementation
  • tools: Utility tools and helpers
  • ui: Package that hosts the UI component library
  • ui-utils: Package that hosts UI utility functions and helpers

Local Development

Setup Database

Start the database (requires Docker to be installed)

npx nx run storage-postgres:db:start

Run migrations

npx nx run storage-postgres:migrate

Seed the database

npx nx run storage-postgres:seed

Start the development server

npx nx run web:dev:local

Running Tests

To run tests for affected projects:

npx nx affected -t test --parallel=1

Note: We use --parallel=1 to ensure proper database isolation between tests.

Database Development Tools

This project includes the VSCode Drizzle ORM extension which provides convenient database development tools:

  • Drizzle Visualizer: Opens a visual representation of your database schema. Access it by clicking "Open Drizzle Visualizer" in any drizzle.config.ts file.
  • Drizzle Studio: A GUI for viewing and managing your database data. Access it by clicking "Open Drizzle Studio" in any drizzle.config.ts file.

Both tools open as tabs directly in your VSCode editor for a seamless development experience.

Build for production

Run pnpm run build to build the application. The build artifacts are stored in the output directory (e.g. dist/ or build/), ready to be deployed.

Running arbitrary tasks within different packages

To execute tasks with Nx use the following syntax:

npx nx <target> <project> <...options>

You can also run multiple targets:

npx nx run-many -t <target1> <target2>

..or add -p to filter specific projects

npx nx run-many -t <target1> <target2> -p <proj1> <proj2>

Targets can be defined in the package.json or projects.json. Learn more in the docs.

Explore the project graph

Run npx nx graph to show the graph of the workspace. It will show tasks that you can run with Nx.

Integrate this nx.dev workspace with editors

Enhance your Nx experience by installing Nx Console for your favorite editor. Nx Console provides an interactive UI to view your projects, run tasks, generate code, and more! Available for VSCode, IntelliJ and comes with a LSP for Vim users.

Contributors

hypha platform v3 contributors