-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dev #11
Conversation
…ystem time to a specific date
…andle not found errors ✨ feat(queue-in-memory.repository.ts): add implementation for getAll, getById, update, and delete methods in QueueRepositoryInMemory class
…PrismaRepository ✨ feat(queue-prisma.repository.ts): implement getAll, getById, update, delete, and deleteAll methods in QueuePrismaRepository using Prisma ORM for database operations
…ervice constructor to improve code modularity and testability 🐛 fix(queue.service.ts): add validation to check if the queue is open before creating a new customer to prevent creating customers when the queue is closed
…positoryInMemory instead of OpenRepository ✨ feat(queue.service.spec.ts): add logic to update isOpen status in OpenRepository before running tests to ensure accurate results
…mentation for openRepository.getById to fix test failure
…uter' module to use in QueueService constructor 🔀 merge(queue-router): pass 'openRepository' function as a parameter to QueueService constructor to enable interaction with open queues
…to validate and parse request query parameters
The Status type was not being used in the Open entity, so it was removed to improve code cleanliness and remove unnecessary code.
…f an array includes a specific value
…re in index.ts ✨ feat(queue-router): add endpoint to update queue status based on query parameters 🔧 fix(queue.controller): add missing imports and implement updateStatus method 🔧 fix(queue.service): add missing import and implement updateStatus method ✨ feat(queue-query-update-status): add schema for query parameters in update status endpoint
…ensure it returns "Hello world!" message
…' to 'error' for better error handling and consistency
… the test file ✨ feat(queue-router.spec.ts): add test case for GET /queue/today endpoint to retrieve current day customers ✨ feat(queue-router.spec.ts): add test case for POST /queue/:id endpoint to update status to DONE
…y validation code 🐛 fix(queue.controller.ts): fix response status code to return 200 OK instead of 201 CREATED
…t' properties from the Omit type to prevent overwriting these values
…tseat/eslint-config/react and next/core-web-vitals for better linting rules and core web vitals support 🔧 chore(package.json): add lint:fix script to run eslint with --fix flag for automatic linting fixes 🗑️ chore: remove unused files and dependencies (next.svg, vercel.svg, favicon.ico) 🔧 chore(globals.css): remove unused CSS variables and update tailwind utilities import 🔧 chore(layout.tsx): update lang attribute to "pt-br" for Brazilian Portuguese language 🔧 chore(page.tsx): remove unused imports and update main content to display "Hello World!"
…red files in the frontend Docker build 🔥 refactor(page.tsx): remove empty line at the beginning of the file for code cleanliness 🔧 chore(tailwind.config.ts): remove unused background image configurations to simplify the file 🐳 chore(docker-compose.dev.yml): uncomment and configure frontend service in docker-compose.dev.yml for local development
… type checking 🔧 chore(package.json): add cors as a dependency to enable Cross-Origin Resource Sharing (CORS) support 🔧 chore(app.ts): import cors package and configure it to allow requests from the FRONTEND_URL environment variable 🔧 chore(server.ts): remove APP_PORT environment variable from PORT assignment to simplify configuration
…upport asynchronous operations in the component
…k configuration for frontend and backend services ✨ feat(docker-compose.dev.yml): add support for API_URL environment variable to configure the backend URL in the frontend 🔧 chore(docker-compose.dev.yml): change APP_PORT environment variable to PORT for consistency with other services ✨ feat(docker-compose.dev.yml): add support for FRONTEND_URL environment variable to configure the frontend URL in the backend 🔧 chore(docker-compose.dev.yml): add app-network to networks section for better network isolation
…rvices and networks for the application deployment The docker-compose.yml file is added to the project to define the services and networks required for the application deployment. It includes the following services: - `frontend`: Defines the frontend service with the container name `app_frontend`. It builds the frontend image from the `./app/frontend` directory, exposes port 3000, sets the working directory to `/app-frontend`, runs the command `npm run start`, mounts the `./app/frontend/src` directory as a volume, depends on the `backend` service, sets the environment variable `API_URL` to `http://backend:3001`, and includes a healthcheck to ensure the service is operational. - `backend`: Defines the backend service with the container name `app_backend`. It builds the backend image from the `./app/backend` directory, exposes port 3001, sets the working directory to `/app-backend`, runs the commands `npm run db:generate`, `npm run db:migrate`, and `npm run start`, mounts the `./app/backend/src` directory as a volume, depends on the `db` service, sets various environment variables including `PORT`, `DATABASE_URL`, `JWT_SECRET`, and `FRONTEND_URL`, and includes a healthcheck to ensure the service is operational. - `db-studio`: Defines the db-studio service with the container name `app_db-studio`. It builds the backend image from the `./app/backend` directory, exposes port 5555, sets the working directory to `/app-backend`, runs the command `npm run db:studio`, depends on the `backend` service, sets the environment variable `DATABASE_URL`, and includes a healthcheck to ensure the service is operational. - `db`: Defines the db service using the `postgres:latest` image. It has the container name `db`, exposes port 5432, sets the environment variables `POSTGRES_USER` and `POSTGRES_PASSWORD`, and restarts always. The services are connected to the `app-network` bridge network. This file is added to simplify the deployment process and provide a consistent environment for the application.
…s to improve type safety 🔧 chore(vite.config.ts): load environment variables from .env file and set the server port based on VITE_PORT environment variable or use default port if not provided
…acts, dependencies, and environment files from Docker image 📦 feat(Dockerfile): add Dockerfile for frontend application to build and run the app in a Docker container 🔧 chore(docker-compose.dev.yml): add VITE_PORT environment variable to specify the port for the frontend application in development mode
…support for Web Workers in the frontend app 🔧 chore(tsconfig.json): add "src/env.d.ts" to the "include" array to include the environment declaration file in the TypeScript compilation process
Replace vite
- db | ||
environment: | ||
- PORT=3001 | ||
- DATABASE_URL=postgres://root:root@db:5432/queue |
Check failure
Code scanning / SonarCloud
Sensitive secrets should not be disclosed Critical
depends_on: | ||
- backend | ||
environment: | ||
- DATABASE_URL=postgres://root:root@db:5432/queue |
Check failure
Code scanning / SonarCloud
Sensitive secrets should not be disclosed Critical
SonarCloud Quality Gate failed. 0 Bugs No Coverage information Catch issues before they fail your Quality Gate with our IDE extension SonarLint |
No description provided.