⚡ Project management that doesn't become the project. Boards, Gantt charts, and GitHub integration. Self-host it or use Kaneo Cloud.
TypeScript honoissue-managementissue-trackerjira-alternativekanbanlinear-alternativemcpproject-managementreactself-hostedtypescript
chore(docs): update contributing and environment setup documentation
Andrej Acevskid811c4d1b496
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.mdindex cc1c35c82..6ffe9eab3 100644--- a/CONTRIBUTING.md+++ b/CONTRIBUTING.md@@ -15,7 +15,6 @@ Thanks for wanting to contribute to Kaneo! Whether you're fixing bugs, adding fe- [Code Style](#code-style)- [Commit Messages](#commit-messages)- [Project Structure](#project-structure)- - [Testing](#testing)- [Need Help?](#need-help)## Code of Conduct@@ -45,14 +44,7 @@ pnpm install```3. **Set up environment variables**:-```bash-# Copy the sample environment files-cp apps/api/.env.sample apps/api/.env-cp apps/web/.env.sample apps/web/.env--# Update the environment variables as needed-# See ENVIRONMENT_SETUP.md for detailed instructions-```+ Create `.env` files for both the API and web apps. See [ENVIRONMENT_SETUP.md](ENVIRONMENT_SETUP.md) for detailed instructions on all required environment variables.4. **Start everything up**:```bash@@ -106,10 +98,9 @@ We use **Biome** for formatting and linting. Before you commit:```bashpnpm run lint-pnpm run format```-Most editors can auto-format on save if you install the Biome extension.+This will check and automatically fix formatting issues. Most editors can auto-format on save if you install the Biome extension.### Commit Messages@@ -128,21 +119,12 @@ We use [conventional commits](https://www.conventionalcommits.org/) to keep ourkaneo/├── apps/│ ├── api/ # Backend API (Node.js/Hono)+│ ├── docs/ # Documentation site (Next.js)│ └── web/ # Frontend app (React/Vite)├── packages/ # Shared code and configs└── charts/ # Kubernetes Helm charts```-### Testing--Run the test suite before submitting:--```bash-pnpm run test-```--If you're adding new features, please include tests.-## Need Help?- **Discord**: Join our [Discord server](https://discord.gg/rU4tSyhXXU) for real-time help@@ -156,6 +138,5 @@ If you're adding new features, please include tests.- **Documentation** - Help others understand how to use Kaneo- **Performance improvements** - Make things faster- **Accessibility** - Help make Kaneo usable for everyone-- **Testing** - More tests = more confidenceThanks for contributing to Kaneo! 🚀diff --git a/ENVIRONMENT_SETUP.md b/ENVIRONMENT_SETUP.mdindex 4db09a20a..6fceb852b 100644--- a/ENVIRONMENT_SETUP.md+++ b/ENVIRONMENT_SETUP.md@@ -4,69 +4,48 @@ This guide will help you set up the Kaneo development environment and troublesho## Quick Start-1. Copy the sample environment files:- ```bash- cp apps/api/.env.sample apps/api/.env- cp apps/web/.env.sample apps/web/.env- ```+1. **Create a `.env` file** in the root of the project with the required environment variables (see the [documentation](https://kaneo.app/docs/core/installation/environment-variables) for the complete list).-2. Update the environment variables in both files (see sections below)--3. Start the development servers:+2. **Start the development servers**:```bashpnpm dev```-## API Environment Variables--Create `apps/api/.env` with the following variables:--### Required Variables--- `DATABASE_URL`: PostgreSQL connection string- ```- DATABASE_URL=postgresql://kaneo_user:kaneo_password@localhost:5432/kaneo- ```+This starts both the API (port 1337) and web app (port 5173). Both will automatically reload when you make changes.-- `JWT_ACCESS`: Secret key for JWT token generation- ```- JWT_ACCESS=your-development-secret-here- ```+> **Tip**: The web app at http://localhost:5173 will automatically connect to the API at http://localhost:1337-### Optional Variables--- `DISABLE_REGISTRATION`: Set to "true" to disable new user registration-- `DEMO_MODE`: Set to "true" to enable demo mode for testing-- `CORS_ORIGINS`: Comma-separated list of allowed origins- ```- CORS_ORIGINS=http://localhost:3000,https://yourdomain.com- ```-- `PORT`: API server port (default: 1337)+## Environment Variables-### GitHub Integration (Optional)+Kaneo uses a **single `.env` file** in the root of the project for all environment variables. This file is shared by both the API and web services.-- `GITHUB_APP_ID`: GitHub App ID for repository integration-- `GITHUB_PRIVATE_KEY`: GitHub App Private Key (PEM format)-- `GITHUB_WEBHOOK_SECRET`: GitHub App Webhook Secret-- `GITHUB_APP_NAME`: GitHub App Name+### Required Variables-## Frontend Environment Variables+For development, you'll need at minimum:-Create `apps/web/.env` with the following variables:+- `KANEO_CLIENT_URL` - The URL of the web application (e.g., `http://localhost:5173`)+- `KANEO_API_URL` - The URL of the API (e.g., `http://localhost:1337`)+- `AUTH_SECRET` - Secret key for JWT token generation+- `DATABASE_URL` - PostgreSQL connection string+- `POSTGRES_DB` - PostgreSQL database name+- `POSTGRES_USER` - PostgreSQL username+- `POSTGRES_PASSWORD` - PostgreSQL password-### Required Variables+### Development-Specific Variables-- `VITE_API_URL`: URL of the API server- ```- VITE_API_URL=http://localhost:1337- ```+For local development, the web app also supports:+- `VITE_API_URL` - API URL for development (defaults to `http://localhost:1337` if not set)+- `VITE_APP_URL` - App URL for generating links (optional)### Optional Variables-- `VITE_APP_URL`: App URL for generating links- ```- VITE_APP_URL=http://localhost:3000- ```+Kaneo supports many optional configuration options including:+- SSO providers (GitHub, Google, Discord, Custom OAuth/OIDC)+- SMTP configuration for email+- Access control settings+- CORS configuration++For a complete list of all environment variables, their descriptions, and configuration options, see the [official documentation](https://kaneo.app/docs/core/installation/environment-variables).## Common Issues & Troubleshooting@@ -79,16 +58,18 @@ Create `apps/web/.env` with the following variables:**Solutions:**-1. **Check API URL Configuration:**- - Ensure `VITE_API_URL` in frontend `.env` matches your API server URL- - Verify the API server is running on the correct port+1. **Check URL Configuration:**+ - Ensure `KANEO_API_URL` matches your API server URL+ - Ensure `KANEO_CLIENT_URL` matches your web app URL+ - For development, you can also set `VITE_API_URL` in your `.env` file2. **Configure CORS Origins:**- - Add your frontend URL to `CORS_ORIGINS` in API `.env`:+ - Add your frontend URL to `CORS_ORIGINS` in your `.env`:```- CORS_ORIGINS=http://localhost:3000,https://yourdomain.com+ CORS_ORIGINS=http://localhost:5173,https://yourdomain.com```- For development, you can leave `CORS_ORIGINS` empty to allow all origins+ - **Note:** `CORS_ORIGINS` should match `KANEO_CLIENT_URL` for proper authentication3. **Check Protocol Consistency:**- Ensure both frontend and API use the same protocol (http/https)@@ -109,7 +90,7 @@ Create `apps/web/.env` with the following variables:1. **Check PostgreSQL:**- Ensure PostgreSQL is running- Verify database exists and credentials are correct- - Test connection: `psql postgresql://kaneo_user:kaneo_password@localhost:5432/kaneo`+ - Test connection: `psql $DATABASE_URL`2. **Update DATABASE_URL:**- Ensure the connection string format is correct@@ -123,9 +104,10 @@ Create `apps/web/.env` with the following variables:**Solutions:**-1. **Check JWT Configuration:**- - Ensure `JWT_ACCESS` is set in API `.env`+1. **Check Authentication Configuration:**+ - Ensure `AUTH_SECRET` is set in your `.env` file- Use a strong secret in production+ - Verify `KANEO_CLIENT_URL` and `KANEO_API_URL` are correctly configured2. **Clear Browser Data:**- Clear cookies and local storage@@ -155,14 +137,16 @@ Create `apps/web/.env` with the following variables:### Development- Use `http://localhost` for both frontend and API-- Leave `CORS_ORIGINS` empty to allow all origins-- Use simple JWT secrets (not for production)+- Leave `CORS_ORIGINS` empty to allow all origins (or set it to match your local URLs)+- Use simple secrets for `AUTH_SECRET` (not for production)+- The web app will use `VITE_API_URL` if set, otherwise defaults to `http://localhost:1337`### Production- Use HTTPS for both frontend and API-- Set specific `CORS_ORIGINS` for security-- Use strong, unique JWT secrets+- Set specific `CORS_ORIGINS` for security (should match `KANEO_CLIENT_URL`)+- Use strong, unique secrets for `AUTH_SECRET`- Configure proper database credentials+- Ensure `KANEO_CLIENT_URL` and `KANEO_API_URL` are set to your production URLs## Getting Help@@ -172,9 +156,6 @@ If you're still experiencing issues:2. Review the API server logs3. Verify all environment variables are set correctly4. Ensure all services (PostgreSQL, API, Frontend) are running+5. Consult the [official documentation](https://kaneo.app/docs) for detailed guides and troubleshooting-The application now includes enhanced error handling that will provide specific troubleshooting steps for common issues like CORS problems.--## Testing Error Handling--You can test the error handling by visiting `/test-error` in your browser. This will show you how the error display component looks and what troubleshooting steps are provided for different types of errors.\ No newline at end of file+For the most up-to-date information on environment variables and configuration, always refer to the [official documentation](https://kaneo.app/docs/core/installation/environment-variables).diff --git a/README.md b/README.mdindex cea7a0f73..1a426df28 100644--- a/README.md+++ b/README.md@@ -92,7 +92,7 @@ volumes:postgres_data:```-Save this as `compose.yml`, create a `.env` file with your configuration (see [Configuration Options](#configuration-options) below), run `docker compose up -d`, and open [http://localhost:5173](http://localhost:5173).+Save this as `compose.yml`, create a `.env` file with your configuration (see the [documentation](https://kaneo.app/docs) for all required environment variables), run `docker compose up -d`, and open [http://localhost:5173](http://localhost:5173).> **Important:** See our [full documentation](https://kaneo.app/docs) for detailed setup instructions, environment variable configuration, and troubleshooting guides.@@ -100,44 +100,11 @@ Save this as `compose.yml`, create a `.env` file with your configuration (see [CFor development, see our [Environment Setup Guide](ENVIRONMENT_SETUP.md) for detailed instructions on configuring environment variables and troubleshooting common issues like CORS problems.-### Configuration Options+### Configuration-Here are the essential environment variables you'll need in your `.env` file:+Kaneo requires several environment variables to be configured. The Docker Compose setup above handles the database automatically, but you'll need to configure environment variables for the API and web services.-| Variable | What it does | Default |-| -------- | ------------ | ------- |-| `KANEO_API_URL` | Where the web app finds the API | Required |-| `JWT_ACCESS` | Secret key for user authentication | Required |-| `DATABASE_URL` | PostgreSQL connection string | Required |-| `POSTGRES_DB` | PostgreSQL database name | `kaneo` |-| `POSTGRES_USER` | PostgreSQL username | Required |-| `POSTGRES_PASSWORD` | PostgreSQL password | Required |-| `DISABLE_REGISTRATION` | Block new user signups | `true` |--For a complete list of configuration options and advanced settings, see the [full documentation](https://kaneo.app/docs).--### Database Setup--Kaneo uses PostgreSQL for data storage. The Docker Compose setup above handles this automatically, but if you're running Kaneo outside of Docker, or if you are using an external postgres database, you'll need to:--1. **Install PostgreSQL** (version 12 or higher)-2. **Create a database and user:**- ```sql- CREATE DATABASE kaneo;- CREATE USER kaneo_user WITH PASSWORD 'your_password';- GRANT ALL PRIVILEGES ON DATABASE kaneo TO kaneo_user;-- \c kaneo;- GRANT USAGE ON SCHEMA public TO kaneo_user;- GRANT CREATE ON SCHEMA public TO kaneo_user;- ALTER SCHEMA public OWNER TO kaneo_user;- ```-3. **Set the DATABASE_URL environment variable:**- ```bash- export DATABASE_URL="postgresql://kaneo_user:your_password@localhost:5432/kaneo"- ```--For more database configuration options and troubleshooting, visit the [documentation](https://kaneo.app/docs).+For complete configuration instructions, including all required environment variables, database setup for non-Docker deployments, and advanced settings, see the [documentation](https://kaneo.app/docs).## Kubernetes Deployment@@ -154,11 +121,7 @@ git clone https://github.com/usekaneo/kaneo.gitcd kaneopnpm install-# Copy environment files-cp apps/api/.env.sample apps/api/.env-cp apps/web/.env.sample apps/web/.env--# Update environment variables as needed+# Create a .env file in the root with required environment variables# See ENVIRONMENT_SETUP.md for detailed instructions# Start development serversdiff --git a/apps/docs/next-env.d.ts b/apps/docs/next-env.d.tsindex c4b7818fb..9edff1c7c 100644--- a/apps/docs/next-env.d.ts+++ b/apps/docs/next-env.d.ts@@ -1,6 +1,6 @@/// <reference types="next" />/// <reference types="next/image-types/global" />-import "./.next/dev/types/routes.d.ts";+import "./.next/types/routes.d.ts";// NOTE: This file should not be edited// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.