{"id":31554593,"url":"https://github.com/aw1875/elysia-auth-template","last_synced_at":"2026-04-16T00:32:36.580Z","repository":{"id":317795358,"uuid":"1068873011","full_name":"aw1875/elysia-auth-template","owner":"aw1875","description":"Template repository for setting up authentication in an Elysia application","archived":false,"fork":false,"pushed_at":"2025-10-03T03:37:39.000Z","size":17,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-10-03T05:38:24.425Z","etag":null,"topics":["auth","bun","elysia"],"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/aw1875.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,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-10-03T03:31:36.000Z","updated_at":"2025-10-03T03:40:30.000Z","dependencies_parsed_at":"2025-10-03T05:38:35.199Z","dependency_job_id":"a4108291-945e-4631-be91-d8bdac9d62d7","html_url":"https://github.com/aw1875/elysia-auth-template","commit_stats":null,"previous_names":["aw1875/elysia-auth-template"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/aw1875/elysia-auth-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aw1875%2Felysia-auth-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aw1875%2Felysia-auth-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aw1875%2Felysia-auth-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aw1875%2Felysia-auth-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aw1875","download_url":"https://codeload.github.com/aw1875/elysia-auth-template/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aw1875%2Felysia-auth-template/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31866339,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-15T15:24:51.572Z","status":"ssl_error","status_checked_at":"2026-04-15T15:24:39.138Z","response_time":63,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["auth","bun","elysia"],"created_at":"2025-10-04T21:10:47.693Z","updated_at":"2026-04-16T00:32:36.549Z","avatar_url":"https://github.com/aw1875.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Elysia Auth Template\n\nThis is a template repository for setting up authentication in an Elysia application. This template uses JWT for authentication rather than sessions along with several other technologies to provide a robust authentication system.\n\n### Technologies Used\n\n- Bun\n- Elysia\n- JWT\n- Zod\n- MySQL\n- Prisma ORM\n- Redis\n\n## Setup Instructions\n\nClone the repository and install dependencies:\n\n```bash\ngit clone https://github.com/aw1875/elysia-auth-template.git\ncd elysia-auth-template\nbun install\n```\n\nCopy the `.env.example` file to `.env` and update the database connection string if not using the default docker connections.\n\nStart the docker containers for MySQL and Redis:\n\n```bash\ndocker compose up -d\n```\n\nRun the prisma migrations to set up the database schema:\n\n```bash\nbunx prisma migrate dev\n```\n\nGenerate an HS256 key for JWT and set it as an environment variable:\n\n```bash\nopenssl rand -base64 32 | tr '+/' '-_' | tr -d '=' # Generates a URL-safe base64 string\n```\n\nBe sure to add this to your `.env` file as `JWT_SECRET`.\n\nStart the development server:\n\n```bash\nbun dev\n```\n\n## Inspecting data\n\nRedis is currently configured ot use [RedisInsight](https://redis.io/insight/) which you can view at [http://localhost:5540](http://localhost:5540). You'll then want to add a new database with the following details:\n\n- `Database Alias`: Your choise\n- `Host`: host.docker.internal\n- `Port`: 6379\n\n[phpMyAdmin](https://www.phpmyadmin.net/) is also configured for viewing the MySQL database at [http://localhost:8080](http://localhost:8080). The default username is `root` and the password is `password` (if using the default docker values).\n\n## API Endpoints\n\nAll endpoints are prefixed with `/api/v1`.\n\n- `GET /docs`: OpenAPI documentation.\n- `GET /health`: Health check endpoint.\n- `POST /auth/signup`: User signup.\n- `POST /auth/signin`: User signin.\n- `POST /auth/signout`: User signout.\n- `POST /auth/refresh`: Refresh JWT tokens.\n- `GET /auth/session`: Get current user details (requires authentication).\n\n## Notes\n\nCurrently, `host.docker.internal` is mapped to `172.17.0.1` in the docker-compose file. You may need to change this based on your docker setup (check the `default-address-pools`). On Linux, you can set this in the Docker daemon configuration file at: `/etc/docker/daemon.json`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faw1875%2Felysia-auth-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faw1875%2Felysia-auth-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faw1875%2Felysia-auth-template/lists"}