⚠️ Educational Project DisclaimerThis is a learning project created to explore and integrate different programming languages and frameworks within a single monorepo. It may contain suboptimal or outdated solutions as it serves primarily as an experimental playground for technology integration.
Current project is a polyglot monorepo managed by Nx that combines multiple applications:
Frontend application (OAuth PKCE, realtime Excalidraw collaboration, JSONAPI filtering/pagination/sorting)
- Port: 3000
- Tech: Next.js 16, TypeScript, React, Tailwind CSS, PostgreSQL
Backend API with Ash Framework providing JSON:API endpoints.
- Port: 4000
- Tech: Elixir, Phoenix, Ash Framework, PostgreSQL
Traditional Phoenix application for channel logic.
- Port: 4001
- Tech: Elixir, Phoenix, Ecto, PostgreSQL
Before beginning, ensure the following are installed:
- Node.js (v20.x or higher)
- npm (v10.x or higher)
- Elixir (v1.14 or higher)
- Erlang/OTP (v25 or higher)
- PostgreSQL (v14 or higher)
or use asdf tool version manager with instructions below.
The project uses .tool-versions to declare required runtimes; asdf can install and manage these versions.
-
Install
asdffor the operating system and follow the official getting started guide. -
Install required asdf plugins:
- Node.js - asdf-nodejs
- Erlang - asdf-erlang
- Elixir - asdf-elixir
- PostgreSQL - asdf-postgres
See the plugin documentation for platform-specific prerequisites and additional usage notes.
-
Install the versions declared in
.tool-versionsby running the following command from the project root (after required plugins are added):
asdf installNotes:
- Building runtimes dependencies may require native dependencies (e.g., C build tools, OpenSSL, zlib). See the plugin documents for OS-specific prerequisites.
- If
asdfis not used, install required runtimes using the system package manager.
# Install all dependencies
npm install
# Seed the database with test data (optional)
npx nx run ash_framework:seed# Start all applications in development mode
npx nx run-many -t serve
# Or use interactive UI to select and run targets
npx nx run-many -t serve --tui
# Or start applications individually:
npx nx run nextjs:serve # http://localhost:3000
npx nx run ash_framework:serve # http://localhost:4000
npx nx run phoenix_framework:serve # http://localhost:4001All project commands are based on Nx. Available targets are defined in each project's project.json file.
# List all projects in the workspace
npx nx show projects
# Show dependency graph (opens in browser)
npx nx graph
# Run a target for all projects
npx nx run-many -t <target>
# Run a specific target for a project
npx nx run <project>:<target>
# Examples:
npx nx run-many -t build # Build all projects
npx nx run-many -t test # Test all projects
npx nx run nextjs:build # Build Next.js app
npx nx run ash_framework:test # Test Ash Framework app- Nx Documentation - Monorepo management
- Next.js Documentation - Frontend framework
- Phoenix Framework - Web framework
- Ash Framework - Declarative resource framework
- Elixir - Programming language
ISC