{"id":14957449,"url":"https://github.com/devorein/bupd","last_synced_at":"2025-10-01T17:30:40.799Z","repository":{"id":44895825,"uuid":"435555521","full_name":"Devorein/BUPD","owner":"Devorein","description":"A modern fullstack application for BUPD","archived":false,"fork":false,"pushed_at":"2022-06-05T10:39:46.000Z","size":1914,"stargazers_count":6,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"staging","last_synced_at":"2025-01-16T02:23:16.979Z","etag":null,"topics":["digitalocean","eslint","express","github-actions","jest","jwt","lerna","material-ui","monorepo","morgan","mysql","next-js","node","postman","react","tailwindcss","typescript","vercel","yup"],"latest_commit_sha":null,"homepage":"http://bupd.xyz","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/Devorein.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}},"created_at":"2021-12-06T15:49:45.000Z","updated_at":"2023-11-05T11:27:11.000Z","dependencies_parsed_at":"2022-08-25T15:01:36.312Z","dependency_job_id":null,"html_url":"https://github.com/Devorein/BUPD","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Devorein%2FBUPD","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Devorein%2FBUPD/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Devorein%2FBUPD/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Devorein%2FBUPD/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Devorein","download_url":"https://codeload.github.com/Devorein/BUPD/tar.gz/refs/heads/staging","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234883314,"owners_count":18901365,"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":["digitalocean","eslint","express","github-actions","jest","jwt","lerna","material-ui","monorepo","morgan","mysql","next-js","node","postman","react","tailwindcss","typescript","vercel","yup"],"created_at":"2024-09-24T13:14:54.998Z","updated_at":"2025-10-01T17:30:40.334Z","avatar_url":"https://github.com/Devorein.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e \u003ch1\u003eBUPD\u003c/h1\u003e \u003c/div\u003e\n\u003cdiv align=\"center\"\u003e\u003cb\u003eA modern fullstack police application for BUPD\u003c/b\u003e\u003c/div\u003e\n\n\u003c/br\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/Devorein/bupd/actions?query=Build\"\u003e\u003cimg src=\"https://github.com/devorein/bupd/workflows/Build/badge.svg\"/\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/Devorein/bupd/actions?query=Deploy\"\u003e\u003cimg src=\"https://github.com/devorein/bupd/workflows/Deploy/badge.svg\"/\u003e\u003c/a\u003e\n  \u003ca href=\"https://app.codecov.io/gh/Devorein/bupd/branch/master\"\u003e\u003cimg src=\"https://img.shields.io/codecov/c/github/devorein/bupd?color=blue\"/\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n- [Packages](#packages)\n- [Requirements](#requirements)\n- [Steps](#steps)\n  - [Environment Variables](#environment-variables)\n- [Workflow](#workflow)\n- [Deployments](#deployments)\n- [Shared dependencies](#shared-dependencies)\n- [Contributors](#contributors)\n\n## Packages\n\nThis monorepo contains the following packages:-\n\n- [**`@bupd/client`**](https://github.com/Devorein/bupd/tree/staging/packages/client): Next.js client package for BUPD\n- [**`@bupd/seeder`**](https://github.com/Devorein/bupd/tree/staging/packages/seeder): Database seeder package for BUPD\n- [**`@bupd/server`**](https://github.com/Devorein/bupd/tree/staging/packages/server) : Node.js Express server package for BUPD\n- [**`@bupd/types`**](https://github.com/Devorein/bupd/tree/staging/packages/types) : Typescript type definition package for BUPD\n- [**`@bupd/validation`**](https://github.com/Devorein/bupd/tree/staging/packages/validation) : Payload validation package for BUPD\n- [**`@bupd/constants`**](https://github.com/Devorein/bupd/tree/staging/packages/constants) : Shared constants package\n\n## Requirements\n\n1. Make sure you have at least node 14 install\n2. Run `node -v` and check the version\n3. If its less than `14` go [here](https://nodejs.org/en/download/) to download the required version\n4. You can also use [nvm](https://github.com/coreybutler/nvm-windows) to maintain multiple node versions in your system\n5. Check if `npm` is installed using `npm -v` (It should be installed along side node.js)\n\n## Steps\n\n1. Run `npm install` to install shared dependencies\n2. Run `npm run bootstrap` to install package dependencies and symlink binaries\n3. Run `npm run build` to build all packages except the client using `typescript`\n4. Run `npm run lint` to lint all packages using `eslint`\n5. Run `npm run test` to run tests for all packages using `jest`\n6. Run `npm run build:watch` to starting building in watch mode\n7. Add environment variable files [environment variables](#environment-variables)\n8. Go to server package using `cd packages/server` and start the server using `npm run start`\n9. After starting the server go to seeder package using `cd packages/seeder` and run the following commands\n   1. `npm run create-db \u003cdb-name\u003e` to create a database with all the tables\n   2. `npm run seeder` to generate and populate database with random data\n   3. Check out the `polices.json` file generated in `packages/seeder/dist/polices.json` to view the info about the generated police.\n10. Go to client package using `cd packages/client` and start the client using `npm run dev`\n\n### Environment Variables\n\nBefore proceeding further please make sure you create the `.env` files\n\n1. Create a `.env` **folder** in root directory\n2. Create two files `seeder.env` and `.env` there\n3. Inside `seeder.env` store these variables\n   1. `ADMIN_PASSWORD`: Password of admin user\n   2. `ADMIN_EMAIL`: Email of admin user\n4. Inside `.env` store these variables\n   1. `DATABASE_PASSWORD`: Mysql database password\n   2. `DATABASE_USER`: Mysql Database user\n   3. `DATABASE_HOST`: Mysql database host\n   4. `DATABASE_NAME`: Mysql database name\n   5. `SERVER_PORT`: Express server port\n   6. `PASSWORD_SALT`: Password salt used when hashing\n   7. `JWT_SECRET`: Jwt secret\n\nA sample `.env` directory\n\n![Sample env directory](\"./../public/env_dir.png)\n\n## Workflow\n\nWe tried to maintain a specific git workflow in this project.\n\n1. Only repository owner has push access to `prod` and `staging` branches\n2. Every member must create a branch from `staging` to work on their tasks\n3. Once they've completed their task they push to the same remote branch.\n4. From there they need to create a PR to the `staging` branch and add other members to review it\n5. Two github workflows will run when a PR is sent to `staging` branch\n   1. First workflow lints, builds and tests the code\n   2. Second workflow creates a preview deployment to vercel\n6. If the reviewer leaves any comments to be further resolved, the member must resolve those.\n7. Once everything's been resolved, the reviewer will merge the PR to `staging` branch.\n8. After an accumulation of commits to `staging` branch, the owner will create a PR from `staging` to `prod` branch\n9. This will trigger one github workflow\n   1. Automated server deployment to our `digitalocean droplet`\n   2. Automated client deployment to our `vercel` project.\n\n## Deployments\n\n- `server`: Our [server](https://api.bupd.xyz) is deployed on a digitalocean droplet\n- `client`: Our [client](https://bupd.xyz) is deployed on a vercel hobby plan project\n\n**NOTE**: We are hosting our database on the same droplet as the server\n\n## Shared dependencies\n\nWe are using a few shared dependencies across the monorepo to avoid installing same npm packages multiple times\n\n1. `tsc`: typescript compiler\n2. `jest`: Javascript test runner\n3. `eslint`: Javascript/Typescript linter\n4. `del-cli`: Package to delete directories\n5. `nodemon`: Package to automatically restart node process\n6. `lerna`: Javascript framework to maintain multi-package repositories (monorepo)\n\n## Contributors\n\n1.  Safwan Shaheer [devorein](https://github.com/Devorein) Backend, Frontend, Devops, Testing, Documentation, ER \u0026 Schema Design\n2.  Zayed Humayun [abystoma](https://github.com/abystoma) Backend, Testing, Documentation, ER \u0026 Schema Design\n3.  Rafid Hamid [xImouto](https://github.com/xImouto) Backend, Testing, Documentation, ER \u0026 Schema Design\n4.  Rakinul Haque [rakinulhaque](https://github.com/rakinulhaque) Backend, ER \u0026 Schema Design, Documentation\n5.  Abrar Awsaf [ShababKabab](https://github.com/ShababKabab) Backend, ER \u0026 Schema Design, Documentation\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevorein%2Fbupd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevorein%2Fbupd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevorein%2Fbupd/lists"}