{"id":25525040,"url":"https://github.com/typeonce-dev/effect-backend-example","last_synced_at":"2025-04-11T03:42:46.647Z","repository":{"id":277826232,"uuid":"933097566","full_name":"typeonce-dev/effect-backend-example","owner":"typeonce-dev","description":"Example of backend API written with effect that connects to a SQL database (included local Docker configuration with postgres and PgAdmin) ⚡️","archived":false,"fork":false,"pushed_at":"2025-02-17T03:34:56.000Z","size":253,"stargazers_count":10,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-25T01:43:40.473Z","etag":null,"topics":["api","backend","effect","effect-ts","pgadmin","postgres-database","postgresql"],"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/typeonce-dev.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}},"created_at":"2025-02-15T06:11:49.000Z","updated_at":"2025-03-10T19:23:36.000Z","dependencies_parsed_at":"2025-02-16T12:25:05.983Z","dependency_job_id":"71b43977-a171-423d-91aa-b20d57275fb3","html_url":"https://github.com/typeonce-dev/effect-backend-example","commit_stats":null,"previous_names":["sandromaglione/effect-api-sql-database"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/typeonce-dev%2Feffect-backend-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/typeonce-dev%2Feffect-backend-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/typeonce-dev%2Feffect-backend-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/typeonce-dev%2Feffect-backend-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/typeonce-dev","download_url":"https://codeload.github.com/typeonce-dev/effect-backend-example/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248339287,"owners_count":21087213,"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":["api","backend","effect","effect-ts","pgadmin","postgres-database","postgresql"],"created_at":"2025-02-19T20:17:24.817Z","updated_at":"2025-04-11T03:42:46.621Z","avatar_url":"https://github.com/typeonce-dev.png","language":"TypeScript","readme":"# How to implement a backend with Effect\n`@effect/platform` provides a type safe API for building backend apps. Any runtime, any database, and with all the features you expect from a TypeScript backend.\n\n\u003e [**Check out the full article**](https://www.typeonce.dev/article/how-to-implement-a-backend-with-effect) to learn how to get started 🚀\n\n\n## Getting started\nThis repository includes the following:\n- Shared `effect` API definition ([`packages/api`](./packages/api/))\n- Backend implementation with `effect` ([`apps/server`](/apps/server/))\n- Frontend implementation with [TanStack Router](https://tanstack.com/router/latest) ([`apps/client`](/apps/client/))\n- Docker compose for local Postgres + [PgAdmin](https://www.pgadmin.org/) environment ([`docker-compose.yaml`](./docker-compose.yaml))\n\nFirst, open [Docker Desktop](https://www.docker.com/products/docker-desktop/) and execute the below command to start the database and PgAdmin:\n\n\u003e Make sure to create a `.env` file inside *both* the root directory *and* `apps/server`, containing the parameters listed inside `.env.example`.\n\n```sh\ndocker compose up\n```\n\nThis will start the database and PgAdmin. You can access `http://localhost:5050/` to login into the **local PgAdmin dashboard**.\n\n\u003e Use the credentials from `.env`: `PGADMIN_MAIL`+`PGADMIN_PW`.\n\nYou can then execute both server and client in the monorepo. Open a second terminal and run the below commands:\n\n```sh\npnpm install\npnpm run dev\n```\n\nThis will start `client` on `http://localhost:3001/`, and `server` on `http://localhost:3000/`.\n\nDone ✨\n\nServer, client, and database all now all connected. Explore more of the `effect` API by playing around with the code in the repository 🕹️\n\n\u003e [**Check out the full article**](https://www.typeonce.dev/article/how-to-implement-a-backend-with-effect) for the details of how the code works 🚀\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftypeonce-dev%2Feffect-backend-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftypeonce-dev%2Feffect-backend-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftypeonce-dev%2Feffect-backend-example/lists"}