How 0-cyberdyne-systems-0/wordplay works
Project type and purpose
• From the README and file tree, this is a full-stack AI-powered writing companion called wordPlay.
• Frontend: React + TypeScript + Vite + Tailwind.
• Backend: Node.js + Express + Drizzle ORM + PostgreSQL.
• Core functionality: a multi-tool AI agent (19 tools) for research, writing, text analysis, plus slash-commands, web search, and analytics.
File structure
• Top-level directories:
• client/ houses all UI code (pages, components, hooks, providers, UI primitives).
• server/ contains the Express API, AI-agent orchestration (ai-agent.ts), database interfaces, route definitions, file operations, slash-command logic, and web-search integration.
• shared/ holds cross-cutting types/schema used by both front and back.
• migrations/ + drizzle.config.ts + scripts/ manage database schema and initialization.
• **test-*.js** files implement agent and integration tests.
• Key config/build files:
• package.json, tsconfig.json, vite.config.ts, postcss.config.js, tailwind.config.ts.
• Architectural patterns:
• MVC-style API (routes → controllers in server/… → db/storage).
• Component-driven UI.
• “Provider” pattern for React context.
• Shared code for types & schemas.
README for additional insights
React Frontend → Express API → AI Agent Engine → {OpenAI API, Ollama Local, Web Search} + → PostgreSQL.
• Features emphasize real-time analytics, rich text editor, context panel, slash-commands, multi-step reasoning.
Elements
• UI components in blue.
• API / services in green.
• External in orange.
• Database in brown.
• Annotations: list major frameworks or libraries next to each component (e.g., “React + Vite”).
Final advice
• shared modules (shared/schema.ts) bridging front and back.