We welcome contributions to Bloggy AI Bot! Whether it's fixing bugs, adding new features, or improving documentation, your help is appreciated.
- Monorepo: pnpm Workspaces, Turborepo
- Framework: Next.js (App Router)
- Language: TypeScript
- Styling: Tailwind CSS, shadcn/ui
- API: tRPC
- State Management: Jotai
- Database: PostgreSQL
- ORM: Prisma
- Authentication: Lucia Auth
- Background Jobs: pg-boss
- AI: Google Gemini API
- SEO Data: DataForSEO API
- Integrations: Ghost Admin API, Octokit (GitHub API)
- Linting/Formatting: ESLint, Prettier
The project is organized as a monorepo using pnpm workspaces:
.
├── apps
│ ├── web/ # Next.js frontend application
│ └── worker/ # Node.js background worker service
├── packages
│ ├── database/ # Prisma schema, client, and migrations
│ ├── eslint-config/ # Shared ESLint configurations
│ └── typescript-config/ # Shared TypeScript configurations
├── package.json
├── pnpm-lock.yaml
├── pnpm-workspace.yaml
├── README.md
└── turbo.json
Follow these steps to set up the project for local development.
- Node.js (v18 or higher recommended - see
package.jsonengines) - pnpm (v9 or higher recommended - see
package.jsonpackageManager) - PostgreSQL Database
- Access keys for:
- Google Gemini API
- DataForSEO API
- (Optional) Ghost Admin API
- (Optional) GitHub Personal Access Token or GitHub App credentials
-
Clone the repository:
git clone https://github.com/your-username/bloggy-ai-bot.git cd bloggy-ai-bot -
Install dependencies:
pnpm install
-
Set up environment variables:
- Create a
.envfile in the root directory. - Copy the contents of
.env.example(if available, otherwise define based on required keys) into.env. - Fill in your database connection string (
DATABASE_URL,DATABASE_URL_POOLING) and API keys. - Ensure the necessary environment variables are also available to the
apps/webandapps/workerpackages (Turborepo might handle some of this, but check specific app requirements).
- Create a
-
Set up the database:
- Navigate to the database package:
cd packages/database - Run Prisma migrations:
pnpm prisma migrate deploy - Generate Prisma Client:
pnpm prisma generate - Go back to the root:
cd ../..
- Navigate to the database package:
-
Start the development servers:
- This command uses Turborepo to run the
devscript in both thewebandworkerapps concurrently.
pnpm dev
- This command uses Turborepo to run the
-
Access the web application:
- Open your browser and navigate to
http://localhost:3000(or the port specified inapps/web/package.json).
- Open your browser and navigate to
- Fork the repository.
- Create a new branch for your feature or bug fix (
git checkout -b feature/your-feature-nameorgit checkout -b fix/issue-description). - Make your changes. Ensure you follow the project's coding standards (see below).
- Test your changes thoroughly.
- Commit your changes with clear and concise commit messages (
git commit -m 'feat: Add X feature'). Consider using Conventional Commits. - Push your branch to your fork (
git push origin feature/your-feature-name). - Open a Pull Request against the
mainbranch of the original repository.- Provide a clear title and description for your PR.
- Link any relevant issues.
- Linting & Formatting: Run
pnpm lintandpnpm formatbefore committing to ensure code consistency. The project uses ESLint and Prettier. - TypeScript: Adhere to the TypeScript configurations defined in the
packages/typescript-configdirectory. - tRPC: Follow best practices for tRPC usage within the Next.js application.
- Comments: Add comments only when necessary to explain complex logic.
- Testing: (If applicable) Add unit or integration tests for new features or bug fixes.
If you have questions or need help, feel free to open an issue on GitHub.