{"id":19293767,"url":"https://github.com/yogyy/elsely","last_synced_at":"2026-05-15T18:06:04.255Z","repository":{"id":233007334,"uuid":"783372185","full_name":"yogyy/elsely","owner":"yogyy","description":"elysia + kysely","archived":false,"fork":false,"pushed_at":"2024-04-12T15:33:35.000Z","size":38,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-24T00:25:31.267Z","etag":null,"topics":["bun","elysia","kysely","nanoid","pg"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yogyy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2024-04-07T17:56:45.000Z","updated_at":"2024-04-12T14:28:31.000Z","dependencies_parsed_at":"2024-04-12T23:14:29.681Z","dependency_job_id":null,"html_url":"https://github.com/yogyy/elsely","commit_stats":null,"previous_names":["yogyy/elsely"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/yogyy/elsely","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yogyy%2Felsely","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yogyy%2Felsely/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yogyy%2Felsely/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yogyy%2Felsely/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yogyy","download_url":"https://codeload.github.com/yogyy/elsely/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yogyy%2Felsely/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":281544220,"owners_count":26519553,"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","status":"online","status_checked_at":"2025-10-28T02:00:06.022Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["bun","elysia","kysely","nanoid","pg"],"created_at":"2024-11-09T22:36:01.411Z","updated_at":"2025-10-29T01:44:59.458Z","avatar_url":"https://github.com/yogyy.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Elysia + Kysely\n\nThis project combines Elysia with Kysely for building a web application with a PostgreSQL database backend.\n\n## Getting Started\n\n### Prerequisites\n\nBefore starting the project, ensure you have the following installed on your machine:\n\n- Bun\n- PostgreSQL\n\n### Setup\n\n#### 1. Clone the Repository\n\n```sh\ngit clone https://github.com/yogyy/elsely.git elsely\n```\n\n#### 2. Install Dependencies\n\n```sh\ncd elsely\nbun install\n```\n\n#### 3. Create Database Table\n\nExecute the following SQL commands to create the necessary table in your PostgreSQL database:\n\n```sql\nCREATE TYPE UserType AS ENUM ('user', 'developer', 'verified');\n\nCREATE TABLE ely_userr(\n    id VARCHAR(100) PRIMARY KEY,\n    email VARCHAR(255) UNIQUE NOT NULL,\n    password VARCHAR(255) NOT NULL,\n    username VARCHAR(255) UNIQUE NOT NULL,\n    name VARCHAR(255) NOT NULL,\n    role \"UserType\" NOT NULL DEFAULT 'user'::\"UserType\",\n    is_active BOOLEAN NOT NULL DEFAULT FALSE,\n    created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\n    updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP\n);\n\nCREATE OR REPLACE FUNCTION trigger_set_updated_at()\nRETURNS TRIGGER AS $$\nBEGIN\n  NEW.updated_at = NOW();\n  RETURN NEW;\nEND;\n$$ LANGUAGE plpgsql;\n\nCREATE TRIGGER set_updated_at\nBEFORE UPDATE ON ely_user\nFOR EACH ROW\nEXECUTE PROCEDURE trigger_set_updated_at();\n\nCREATE TABLE \"ely_post\" (\n    id VARCHAR(50) PRIMARY KEY,\n    content VARCHAR(255) NOT NULL,\n    author_id VARCHAR REFERENCES \"ely_user\"(id) ON DELETE CASCADE,\n    created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\n    updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP\n);\n\nCREATE TRIGGER set_updated_at_trigger\nBEFORE UPDATE ON ely_post\nFOR EACH ROW\nEXECUTE FUNCTION public.trigger_set_updated_at();\n```\n\n#### 4. Create .env File\n\nCopy the sample .env file and update it with your database connection details:\n\n```sh\ncp .env.sample .env\n```\n\n#### 5. Generate Database Types\n\nRun the following command to generate TypeScript types for your database:\n\n```sh\nbun run db:type\n```\n\n#### 6. Run Tests\n\nExecute the following command to run the tests:\n\n```sh\nbun run test\n```\n\nNow you're ready to start developing your Elysia + Kysely project!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyogyy%2Felsely","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyogyy%2Felsely","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyogyy%2Felsely/lists"}