This is the official repository for the service www.analytodon.com.
Analytodon provides analytics and insights for Mastodon accounts, helping users understand their engagement and growth on the Fediverse.
🤝 Contributions are welcome.
🏠 Self-hosting is explicitly allowed.
This project is a monorepo using pnpm workspaces containing:
- 🚀 Backend: A NestJS application providing the API services (
apps/backend
) - 💻 Frontend: A Remix application for the user interface (
apps/frontend
) - 🛠️ CLI: Command-line tools for data management and maintenance (
apps/cli
) - 🔌 REST Client: Auto-generated TypeScript client for the API (
packages/rest-client
)
- 📦 Node.js (v20+)
- 🗄️ MongoDB database
- 📚 pnpm v10.5.2 or later (for package management)
- Clone the repository:
git clone https://github.com/blazer82/analytodon.git
cd analytodon
- Install dependencies:
pnpm install
-
Configure environment variables:
- Create
.env
files in both apps/backend and apps/frontend directories - See the example env files for required variables
- Create
-
Start the development servers:
# Start both frontend and backend in development mode
pnpm run dev
# Or start them individually
pnpm --filter @analytodon/backend run start:dev
pnpm --filter @analytodon/frontend run dev
The monorepo includes several useful scripts:
# Run linting across all packages
pnpm run lint
# Run tests across all packages
pnpm run test
# Check code formatting
pnpm run prettier:check
# Fix code formatting
pnpm run prettier:write
# Generate API client from OpenAPI spec
pnpm run codegen
The backend provides RESTful APIs for account management, authentication, and analytics processing.
# Run backend tests
pnpm --filter @analytodon/backend run test
# Run backend in production mode
pnpm --filter @analytodon/backend run start:prod
The frontend provides the user interface for interacting with Analytodon.
# Build the frontend for production
pnpm --filter @analytodon/frontend run build
# Start the frontend in production mode
pnpm --filter @analytodon/frontend run start
The CLI provides command-line tools for data management, maintenance, and automation tasks.
# Build the CLI
pnpm --filter @analytodon/cli run build
# Run a CLI command
pnpm --filter @analytodon/cli run analytodon-cli [command]
# See available commands
pnpm --filter @analytodon/cli run analytodon-cli help
For production deployment, build all applications:
pnpm run build
Then deploy the built applications according to your hosting environment.
GPL-3.0-only