{"id":23659735,"url":"https://github.com/thejoltjoker/kreacon","last_synced_at":"2025-12-01T15:30:16.664Z","repository":{"id":268686335,"uuid":"858332396","full_name":"thejoltjoker/kreacon","owner":"thejoltjoker","description":"Kreacon is a platform where creativity meets competition, allowing users to share and get involved","archived":false,"fork":false,"pushed_at":"2024-12-26T19:00:54.000Z","size":70047,"stargazers_count":0,"open_issues_count":3,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-12-26T20:16:54.993Z","etag":null,"topics":["azure","drizzle","postgresql","svelte"],"latest_commit_sha":null,"homepage":"","language":"Svelte","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/thejoltjoker.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-09-16T18:00:11.000Z","updated_at":"2024-12-23T23:34:16.000Z","dependencies_parsed_at":"2024-12-18T10:40:28.138Z","dependency_job_id":null,"html_url":"https://github.com/thejoltjoker/kreacon","commit_stats":null,"previous_names":["thejoltjoker/kreacon"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thejoltjoker%2Fkreacon","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thejoltjoker%2Fkreacon/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thejoltjoker%2Fkreacon/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thejoltjoker%2Fkreacon/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thejoltjoker","download_url":"https://codeload.github.com/thejoltjoker/kreacon/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239650496,"owners_count":19674759,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["azure","drizzle","postgresql","svelte"],"created_at":"2024-12-29T02:56:41.643Z","updated_at":"2025-12-01T15:30:16.608Z","avatar_url":"https://github.com/thejoltjoker.png","language":"Svelte","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Kreacon\n\n## For Mattias\n\nHi!\n\nIt's probably easier to just use the deployed version of the app, a bit of a hassle to get everything set up with Azure.\nAs for ticket you can use any `UUID` to get a ticket from the external api (`crypto.randomUUID()` works great for generating a ticket number).\n\n## Getting Started\n\n### Prerequisites\n\n- Docker\n- Node.js (v20)\n- npm\n- nvm (optional, for switching Node versions)\n\n### Development Setup\n\n1. Make sure you are using Node 20:\n\n   ```bash\n   nvm use 20 # optional, if you have nvm installed\n   node --version\n   ```\n\n2. Start the PostgreSQL database:\n\n   ```bash\n   docker compose up -d\n   ```\n\n3. Install dependencies:\n\n   ```bash\n   npm install\n   ```\n\n4. Set up environment variables:\n\n   - Copy `.env.example` to `.env`\n     - `cp .env.example .env`\n   - Update the values as needed\n\n5. Initialize the database:\n\n   ```bash\n   npm run db:reset # Runs migrations and seeds the database\n   ```\n\n6. Start the development server:\n\n   ```bash\n   npm run dev\n   ```\n\n7. Open [http://localhost:5173](http://localhost:5173) in your browser\n\n### Additional Notes\n\n- Use `docker compose down` to stop the database container\n- The database will be accessible at `localhost:5432` with the credentials in `.env`\n- Run `npm run db:studio` to view/edit database content\n- You need to create OAuth apps for Discord and Github if you want to use them\n  - [Create Discord OAuth app](https://discord.com/developers/applications)\n  - [Create Github OAuth app](https://github.com/settings/applications/new)\n- You need to create an Azure Storage account and set the `AZURE_STORAGE_ACCOUNT_KEY` in `.env`\n  - [Create Azure Storage Account](https://portal.azure.com/#create/Microsoft.StorageAccount-ARM)\n\n## Building\n\nTo create a production version of your app:\n\n```bash\nnpm run build\n```\n\n## Commands\n\n| Command          | Description                             |\n| ---------------- | --------------------------------------- |\n| `dev`            | Spin up SvelteKit dev server            |\n| `build`          | Build for production                    |\n| `preview`        | Preview production build                |\n| `check:watch`    | Run Svelte check in watch mode          |\n| `check`          | Run Svelte check                        |\n| `commitlint`     | Lint commit messages                    |\n| `db:dbml`        | Generate dbml file                      |\n| `db:generate`    | Generate migrations                     |\n| `db:migrate`     | Run migrations                          |\n| `db:push`        | Push current schema to database         |\n| `db:reset`       | Run migrations and seed database        |\n| `db:seed`        | Seed database                           |\n| `db:start`       | Run PostgreSQL in a docker container    |\n| `db:studio`      | Start Drizzle Studio                    |\n| `format`         | Format code                             |\n| `lint:fix`       | Lint and fix errors                     |\n| `lint`           | Lint code                               |\n| `logbook`        | Generate logbook entry                  |\n| `prepare`        | Husky                                   |\n| `swa:build`      | Build for Azure Static Web Apps         |\n| `swa:deploy`     | Deploy to Azure Static Web Apps         |\n| `swa:start`      | Start Azure Static Web Apps             |\n| `test:e2e`       | Run end-to-end tests with Playwright    |\n| `test:e2e:ui`    | Run end-to-end tests with Playwright UI |\n| `test:unit`      | Run unit tests with Vitest              |\n| `test`           | Run all tests                           |\n| `i18n:translate` | Translate i18n with Ollama              |\n| `i18n:check`     | Check i18n coverage                     |\n\n## Environment variables\n\n### .env\n\n```\nBASE_URL=http://localhost:5173\nDATABASE_URL=postgresql://root:mysecretpassword@localhost:5432/kreacon\nDB_HOST=localhost\nDB_NAME=kreacon\nDB_PASSWORD=mysecretpassword\nDB_PORT=5432\nDB_USER=root\nNODE_ENV=development\nOAUTH_DISCORD_CLIENT_ID=\u003cdiscord-client-id\u003e\nOAUTH_DISCORD_CLIENT_SECRET=\u003cdiscord-client-secret\u003e\nOAUTH_DISCORD_REDIRECT_URI=\u003cdiscord-redirect-uri\u003e\nOAUTH_GITHUB_CLIENT_ID=\u003cgithub-client-id\u003e\nOAUTH_GITHUB_CLIENT_SECRET=\u003cgithub-client-secret\u003e\nOAUTH_GITHUB_REDIRECT_URI=\u003cgithub-redirect-uri\u003e\nTICKET_API_URL=\u003cticket-api-url\u003e\nBODY_SIZE_LIMIT=10485760\nAZURE_STORAGE_ACCOUNT_NAME=\u003cazure-storage-account-name\u003e\nAZURE_STORAGE_ACCOUNT_KEY=\u003cazure-storage-account-key\u003e\n```\n\n### .env.test.local\n\nSame as `.env` but can use local database.\n\n```\n...\nNODE_ENV=test\nDATABASE_URL=postgresql://root:mysecretpassword@localhost:5432/test\n```\n\n### .env.test\n\nUsed for CI/CD. Include these additional variables and update to use your hosted test database:\n\n```\nNODE_ENV=test\nDATABASE_URL=postgresql://\u003cusername\u003e:\u003cpassword\u003e@\u003chost\u003e:5432/test\nAZURE_POSTGRESQL_SERVER_NAME=\u003cserver-name-without-domain\u003e\nAZURE_POSTGRESQL_RESOURCE_GROUP=\u003cresource-group\u003e\n```\n\n### .env.production\n\nUsed when deploying to production. Update the following variables to use your hosted database and production settings:\n\n```\nNODE_ENV=production\nDATABASE_URL=postgresql://\u003cusername\u003e:\u003cpassword\u003e@\u003chost\u003e:5432/\u003cdatabase\u003e\nBASE_URL=https://your-production-domain.com\nAZURE_POSTGRESQL_SERVER_NAME=\u003cserver-name\u003e\nAZURE_POSTGRESQL_RESOURCE_GROUP=\u003cresource-group\u003e\n\n# OAuth settings (update with production URLs)\nOAUTH_DISCORD_REDIRECT_URI=https://your-production-domain.com/auth/discord/callback\nOAUTH_GITHUB_REDIRECT_URI=https://your-production-domain.com/auth/github/callback\n```\n\n## TODO\n\n- [ ] Remove `For Mattias` from the README\n\n### Profile\n\n- [ ] Fix bug where user gets logged out randomly\n- [ ] Update profile page after adding ticket\n\n### Entries\n\n#### Create entry\n\n- [ ] Show add ticket form if user has no tickets\n\n### Admin\n\n- [ ] Disallow change of submission and voting dates if already in progress\n- [ ] Add custom field: User status\n- [ ] Add custom field: User role\n- [ ] Show number of votes per entry\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthejoltjoker%2Fkreacon","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthejoltjoker%2Fkreacon","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthejoltjoker%2Fkreacon/lists"}