{"id":23832618,"url":"https://github.com/tuanlc/express-prisma-postgresql-boilerplate","last_synced_at":"2025-09-07T12:32:06.549Z","repository":{"id":84511460,"uuid":"452089944","full_name":"tuanlc/express-prisma-postgresql-boilerplate","owner":"tuanlc","description":"This boilerplate follows clean architecture with SOLID principles. This sample define a simple user schema and handle two endpoints that allows users to create new accounts and login by them. There is also a middleware to validate JWT tokens that are provided by clients with `Bearer` authorization header.","archived":false,"fork":false,"pushed_at":"2023-10-07T07:56:00.000Z","size":43,"stargazers_count":9,"open_issues_count":0,"forks_count":5,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-10-30T18:03:28.890Z","etag":null,"topics":["boilerplate","clean-architecture","express","postgresql","prisma","solid","template","typescript"],"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/tuanlc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null},"funding":{"github":null,"patreon":null,"open_collective":null,"ko_fi":"tlcong","tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"lfx_crowdfunding":null,"custom":null}},"created_at":"2022-01-26T00:33:24.000Z","updated_at":"2024-05-22T14:30:27.000Z","dependencies_parsed_at":"2023-03-02T22:15:30.247Z","dependency_job_id":null,"html_url":"https://github.com/tuanlc/express-prisma-postgresql-boilerplate","commit_stats":null,"previous_names":[],"tags_count":0,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tuanlc%2Fexpress-prisma-postgresql-boilerplate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tuanlc%2Fexpress-prisma-postgresql-boilerplate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tuanlc%2Fexpress-prisma-postgresql-boilerplate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tuanlc%2Fexpress-prisma-postgresql-boilerplate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tuanlc","download_url":"https://codeload.github.com/tuanlc/express-prisma-postgresql-boilerplate/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":232212318,"owners_count":18489366,"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":["boilerplate","clean-architecture","express","postgresql","prisma","solid","template","typescript"],"created_at":"2025-01-02T14:38:47.223Z","updated_at":"2025-01-02T14:38:53.802Z","avatar_url":"https://github.com/tuanlc.png","language":"TypeScript","funding_links":["https://ko-fi.com/tlcong"],"categories":[],"sub_categories":[],"readme":"# Boilerplate for express, postgresql, prisma and typescript\n\nThis boilerplate follows clean architecture with SOLID principles. This sample define a simple user schema and handle two endpoints that allows users to create new accounts and login by them. There is also a middleware to validate JWT tokens that are provided by clients with `Bearer` authorization header.\n\n## Technologies\n\n- Environment: Nodejs\n- Language: Typescript\n- Framework: Expressjs\n- ORM: Prisma\n- Database: Postgresql\n- Authentication: Basic, JWT\n- Inversion Of Control (D in SOLID): Awillix\n- Password hash library: bcryptjs\n\n## Prequisite\n\n- Create the `.env` file by copying the `.env.example` file\n- Database:\n\n  - The easy way to have a Postgresql server is using docker or you can use Postgreql cloud\n  - Once you have the database connection URL, replace the sample one in the `.env` file by yours\n\n- Run Postgres database at port 5432\n\n```bash\ndocker run -e POSTGRES_PASSWORD=secrect -e POSTGRES_USER=postgres -p 5432:5432 postgres:15-alpine\n```\n\n- Create `.env` file from `.env.template` and update the `DATABASE_URL`:\n\n```bash\ncp .env.template .env\n```\n\n- Edit file `.env`\n\n```\nDATABASE_URL=\"postgresql://postgres:secrect@localhost:5432/prisma-posgres-boilerplate?schema=public\"\n```\n\n- Install dependencies\n\n```bash\nnpm ci\n```\n\n- Initialize database schema\n\n```bash\nnpx prisma migrate dev --name \"init\" --preview-feature\n```\n\n## Docker build\n\n```bash\ndocker build -t app-name .\n```\n\n## NPM scripts\n\n1. Run dev\n\n```bash\nnpm run dev\n```\n\n2. Linting\n\n```bash\nnpm run lint\n```\n\n3. Build\n\n```bash\nnpm run build\n```\n\n4. Run production\n\n```bash\nnpm run start\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftuanlc%2Fexpress-prisma-postgresql-boilerplate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftuanlc%2Fexpress-prisma-postgresql-boilerplate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftuanlc%2Fexpress-prisma-postgresql-boilerplate/lists"}