Repository Map
Status
- document type: current state
- source of truth: the checked-out
onelinkapplication repository plus thedocs/submodule and local Codex skill library - use this page when the question is “where does this thing live?” or “which repo should I edit?”
Repository Set
OneLink currently operates across four local knowledge and change surfaces:onelink- the main Rails/Vue application repository
onelink/docs- the Mintlify documentation repository mounted into the app repo as a git submodule
onelink/.codex/skills- the versioned project copy of the OneLink skill family
$CODEX_HOME/skills- the installed local Codex skill library used by the runtime agent in this workspace
- product code, migrations, routes, jobs, services, and tests belong to
onelink - docs content, docs navigation, Mintlify config, and local OpenAPI docs belong to
onelink/docs - versioned Codex skill definitions belong to
onelink/.codex/skills - installed Codex runtime skills belong to
$CODEX_HOME/skills
Main Application Repository
The main application repository is a Rails monolith extended by the OneLink fork, with several major code surfaces.Top-Level Directories
app/- Rails controllers, models, services, jobs, views, policies, presenters, and frontend code
enterprise/- inherited technical overlay that extends or overrides core behavior
config/- routes, initializers, environment config, feature flags, AI tool config, Sidekiq, Puma, storage, and other runtime settings
db/- migrations and current schema
spec/- request, controller, model, service, and enterprise test coverage
swagger/- OpenAPI source fragments plus generated JSON output
deployment/- legacy VM/systemd/nginx deployment assets
docker/anddocker-compose*.yaml- container build and local deployment setup
docs/- mounted docs submodule
Frontend Surfaces
Frontend code is primarily underapp/javascript/:
dashboard/- main agent-facing application UI
widget/- embedded chat widget UI
portal/- help center / article portal UI
survey/- CSAT and survey surfaces
sdk/- client SDK-related frontend assets
superadmin_pages/- super admin UI
shared/- shared helpers and components across frontend surfaces
Backend Surfaces
Backend code is primarily split like this:- controllers:
app/controllers/api/,app/controllers/public/,app/controllers/platform/,app/controllers/super_admin/,app/controllers/webhooks/
- services:
app/services/with many feature and provider subfolders
- models:
app/models/plus feature namespaces such aschannel/,integrations/, andscheduling/
- jobs and listeners:
app/jobs/andapp/listeners/
- policies and presenters:
app/policies/andapp/presenters/
Operational Control Files
These files are the main runtime and build control points:Procfile.dev-lite- Rails + Vite local development without Sidekiq
Procfile.dev- Rails + Sidekiq + Vite full local development
docker-compose.yaml- local Docker-based environment
vite.config.mts- frontend bundling and alias behavior
tailwind.config.js- Tailwind tokens and utility config
config/routes.rb- application route surface
config/features.yml- feature flags and product capabilities
config/agents/tools.yml- Captain/custom tool registry
config/initializers/01_inject_enterprise_edition_module.rb- enterprise extension mechanism
Documentation Repository
The docs repository is mounted at:docs/
docs.json- Mintlify navigation and site config
*.mdx- human and agent-readable docs pages
openapi/- local OpenAPI JSON files consumed by Mintlify API reference
scripts/sync-openapi-from-onelink.sh- sync helper that copies OpenAPI output from the app repo
AGENTS.md- docs-specific agent rules
Project Skill Source
The versioned project copy of the OneLink skill family lives under:onelink/.codex/skills
onelink-builderonelink-backendonelink-frontendonelink-apionelink-integrationsonelink-captainonelink-documentationonelink-deployment
Installed Skill Library
The local Codex skill library currently lives under:$CODEX_HOME/skills- typically
~/.codex/skillsifCODEX_HOMEis not customized
onelink-builder- top-level coordinator skill
onelink-backend- Rails/backend implementation surface
onelink-frontend- Vue/dashboard/widget/portal/survey/sdk surface
onelink-api- API contracts and Swagger/OpenAPI surface
onelink-integrations- channels, providers, hooks, and external integrations
onelink-captain- Captain/copilot/documents/custom tools/AI surface
onelink-documentation- Mintlify docs, docs structure, docs repo workflow
onelink-deployment- self-hosted deployment and runtime operations
onelink-gitops- GitHub flow, submodule updates, skill sync, and upstream sync
Skill Sync Rule
Use the project script:./.codex/scripts/sync-skills.sh to-codex-home
Where To Edit By Task
Backend Feature
Edit mostly in:app/models/app/services/app/controllers/config/routes.rbspec/swagger/if API behavior changes
enterprise/ for companion code first.
Frontend Feature
Edit mostly in:app/javascript/dashboard/app/javascript/widget/app/javascript/portal/app/javascript/survey/app/javascript/shared/
components-next/, existing routes, and current stores before adding new structures.
API Contract
Edit mostly in:- controllers and builders/serializers
- request specs
swagger/onelink/docs/openapi/after sync
Docs Change
Edit mostly in:onelink/docs/*.mdxonelink/docs/docs.jsononelink/docs/openapi/*
Deployment Change
Edit mostly in:deployment/docker/docker-compose*.yamlconfig/environments/config/puma.rbconfig/sidekiq.ymldocs/self-hosted/
Reading Order For New Tasks
Use this reading order before editing:- code in
app/,enterprise/,config/,db/, andspec/ - Current Architecture
- Repository Map
- the relevant execution guide under
contributing-guide/ - the relevant skill in
onelink/.codex/skills - the installed runtime copy in
$CODEX_HOME/skillsif you need to confirm what Codex is currently loading