TextDAO Project Structure
This document outlines the directory structure and file organization of the TextDAO project. Understanding this structure is crucial for efficient development, maintenance, and onboarding of new team members.
Directory Structure
textdao-monorepo/
├── packages/
│ ├── contracts/
│ │ ├── src/
│ │ ├── test/
│ │ ├── docs/
│ │ └── README.md
│ │
│ ├── subgraph/
│ │ ├── src/
│ │ ├── schema.graphql
│ │ ├── docs/
│ │ └── README.md
│ │
│ ├── frontend/
│ │ ├── src/
│ │ ├── public/
│ │ ├── docs/
│ │ └── README.md
│ │
│ ├── keeper/
│ │ ├── src/
│ │ ├── docs/
│ │ └── README.md
│ │
│ └── documentation/
│ ├── docs/
│ ├── src/
│ ├── static/
│ ├── docusaurus.config.js
│ └── README.md
│
├── docs/
│ ├── versioning.md
│ ├── glossary.md
│ ├── project-structure.md
│ └── documentation-guidelines.md
│
├── README.md
└── CONTRIBUTING.md
Key Directories and Files
packages/contracts/
Contains the smart contract code for TextDAO and HubDAO.
src/: Smart contract source filestest/: Contract test filesdocs/: Contract-specific documentation
packages/subgraph/
The Graph protocol indexer for TextDAO events.
src/: Subgraph source filesschema.graphql: GraphQL schema for the subgraphdocs/: Subgraph-specific documentation
packages/frontend/
React-based user interface for TextDAO.
src/: React application source filespublic/: Static assetsdocs/: Frontend-specific documentation
packages/keeper/
Off-chain automation services for TextDAO.
src/: Keeper service source filesdocs/: Keeper-specific documentation
packages/documentation/
Docusaurus-based documentation site.
docs/: Markdown files for the documentation sitesrc/: Custom React components for the documentation sitestatic/: Static assets for the documentation sitedocusaurus.config.js: Docusaurus configuration file
docs/
Project-wide documentation files.
versioning.md: Versioning guidelinesglossary.md: Project glossaryproject-structure.md: This filedocumentation-guidelines.md: Guidelines for writing documentation
Naming Conventions
- React components use PascalCase (e.g.,
ProposalList.tsx) - Other JavaScript/TypeScript files use camelCase (e.g.,
utils.ts) - Test files are suffixed with
.test.tsor.test.tsx - Solidity files use PascalCase (e.g.,
TextDAO.sol) - Documentation files use kebab-case (e.g.,
project-structure.md)
Best Practices
- Keep related functionality in the same directory.
- Use clear and descriptive names for files and directories.
- Maintain README files in key directories to provide additional context.
- Follow the established naming conventions consistently.
- Update this document when making significant changes to the project structure.