Map project
Goal: Mitigate disaster effects and efficiently handle disaster response
- Kevin Vega
- Martin Edgar Atole
- Albert Perez
b-prism
├── apps/ # Contains various microservices application.
│ ├── authentication-service/ # Authentication service application.
│ ├── client/ # Client-side application.
│ ├── user-service/ # User service application.
│ └── verification-service/ # Verification service application.
├── libs/ # Contains shared libraries used across applications.
│ └── backend/ # Backend-specific libraries.
│ ├── app-service/ # Contains services related to the application logic.
│ ├── database-services/ # Contains services related to database interactions.
│ └── prisma-db-lib/ # Contains the Prisma database client library.
│ ├── dto/ # Data Transfer Object library.
│ ├── enums/ # Enums library.
│ ├── shadcn-lib/ # Initialization and utilization helper for shadcn.
│ ├── shadcn-ui/ # Shadcn component library.
│ ├── utils/ # Utility functions and helpers.
│ └── enums/ # Enums for entire project
├── dataset/ # Dataset for map
├── notebooks/ # Contains jupyter notebook for solution modeling
├── prisma/ # Config file for Prisma / DB model, DB Connection, etc.
├── .git/ # Git version control directory
├── .gitignore # Git ignore configuration file.
├── nx.json # Nx workspace configuration file.
├── package.json # Node.js project metadata and dependencies.
└── tsconfig.base.json # Base TypeScript configuration for the workspace.
To set up the project, follow these steps:
-
Navigate to the project directory:
cd b-prism/ -
Install the dependencies:
npm install
-
Set up environment variables:
Create a
.envfile in the root of your project and add the following contents:NEXT_PUBLIC_MAPBOX_TOKEN= NEXT_PUBLIC_MAPBOX_STYLE= DATABASE_URL= # Development NEXT_PUBLIC_DEV_API_BASE_URL= AUTH_SERVICE_API_PORT= VERIFICATION_SERVICE_API_PORT= USER_SERVICE_API_PORT= GOOGLE_CLIENT_ID= GOOGLE_CLIENT_SECRET= NEXTAUTH_URL= NEXTAUTH_SECRET=Make sure to replace the placeholders with your actual configuration values.
-
Set up the database with Prisma:
Push your Prisma schema to the database:
npx prisma db push
Generate the Prisma client:
npx prisma generate
To run all application in development mode, use:
npm run serve:all-devTo run all application in production mode, use:
npx run serve:all-prodTo run a microservice, such as the authentication service, in development mode, use:
npx nx run authentication-service:serve:developmentRepeat the above command for other services by replacing authentication-service with the desired service name.
This setup guide should help you get started with the BPrism project. If you encounter any issues, please refer to the documentation or reach out for support.
Make sure you have Node.js installed on your machine before running the above command.
-
Node
-
Project Dependencies
Package Command @auth0/nextjs-auth0 npm i @auth0/nextjs-auth0@nestjs/common npm i @nestjs/common@nestjs/core npm i @nestjs/core@nestjs/platform-express npm i @nestjs/platform-express@nestjs/swagger npm i @nestjs/swagger@next-auth/prisma-adapter npm i @next-auth/prisma-adapter@prisma/client npm i @prisma/client@radix-ui/react-accordion npm i @radix-ui/react-accordion@radix-ui/react-dropdown-menu npm i @radix-ui/react-dropdown-menu@radix-ui/react-icons npm i @radix-ui/react-icons@radix-ui/react-slot npm i @radix-ui/react-slot@types/mapbox-gl npm i @types/mapbox-glaxios npm i axiosbcrypt npm i bcryptclass-transformer npm i class-transformerclass-validator npm i class-validatorclass-variance-authority npm i class-variance-authorityclsx npm i clsxlucide-react npm i lucide-reactmapbox-gl npm i mapbox-glnext npm i nextnext-auth npm i next-authreact npm i reactreact-dom npm i react-domreact-map-gl npm i react-map-glreflect-metadata npm i reflect-metadatarxjs npm i rxjstailwind-merge npm i tailwind-mergetailwindcss-animate npm i tailwindcss-animate -
Development Dependencies
Package Command @eslint/compat npm i --save-dev @eslint/compat@eslint/js npm i --save-dev @eslint/js@nestjs/schematics npm i --save-dev @nestjs/schematics@nestjs/testing npm i --save-dev @nestjs/testing@nx/eslint npm i --save-dev @nx/eslint@nx/eslint-plugin npm i --save-dev @nx/eslint-plugin@nx/jest npm i --save-dev @nx/jest@nx/js npm i --save-dev @nx/js@nx/nest npm i --save-dev @nx/nest@nx/next npm i --save-dev @nx/next@nx/node npm i --save-dev @nx/node@nx/react npm i --save-dev @nx/react@nx/vite npm i --save-dev @nx/vite@nx/web npm i --save-dev @nx/web@nx/webpack npm i --save-dev @nx/webpack@nx/workspace npm i --save-dev @nx/workspace@swc-node/register npm i --save-dev @swc-node/register@swc/cli npm i --save-dev @swc/cli@swc/core npm i --save-dev @swc/core@swc/helpers npm i --save-dev @swc/helpers@testing-library/react npm i --save-dev @testing-library/react@types/bcrypt npm i --save-dev @types/bcrypt@types/jest npm i --save-dev @types/jest@types/node npm i --save-dev @types/node@types/react npm i --save-dev @types/react@types/react-dom npm i --save-dev @types/react-dom@vitejs/plugin-react-swc npm i --save-dev @vitejs/plugin-react-swc@vitest/coverage-v8 npm i --save-dev @vitest/coverage-v8@vitest/ui npm i --save-dev @vitest/uiautoprefixer npm i --save-dev autoprefixerbabel-jest npm i --save-dev babel-jesteslint npm i --save-dev eslinteslint-config-next npm i --save-dev eslint-config-nexteslint-config-prettier npm i --save-dev eslint-config-prettiereslint-plugin-import npm i --save-dev eslint-plugin-importeslint-plugin-jsx-a11y npm i --save-dev eslint-plugin-jsx-a11yeslint-plugin-react npm i --save-dev eslint-plugin-reacteslint-plugin-react-hooks npm i --save-dev eslint-plugin-react-hooksjest npm i --save-dev jestjest-environment-jsdom npm i --save-dev jest-environment-jsdomjest-environment-node npm i --save-dev jest-environment-nodejsdom npm i --save-dev jsdomnx npm i --save-dev nxpostcss npm i --save-dev postcssprettier npm i --save-dev prettiertailwindcss npm i --save-dev tailwindcssts-jest npm i --save-dev ts-jestts-node npm i --save-dev ts-nodetslib npm i --save-dev tslibtypescript npm i --save-dev typescripttypescript-eslint npm i --save-dev typescript-eslintvite npm i --save-dev vitevitest npm i --save-dev vitestwebpack-cli npm i --save-dev webpack-cli -
Production Dependencies
Package Command pm2 npm i -g pm2
-
This section provides a comprehensive list of the dependencies used in your project, along with the commands to install them. Adjust the list as needed to fit your specific project requirements.
If you would like to contribute to this project, please fork the repository and submit a pull request. For major changes, please open an issue first to discuss what you would like to change.
Specify the license under which the project is distributed. For example:
This project is licensed under the MIT License - see the LICENSE file for details.