diff --git a/.github/ISSUE_TEMPLATE/chore--.md b/.github/ISSUE_TEMPLATE/chore--.md new file mode 100644 index 000000000..02df79cf0 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/chore--.md @@ -0,0 +1,35 @@ +--- +name: 'chore: ' +about: Template for maintenance tasks +title: '[CHORE]' +labels: chore +assignees: '' +--- + +## Description + + + +## Motivation + + + +## Proposed Changes + + + +## Expected Outcome + + + +## Acceptance Criteria + + + +- [ ] +- [ ] +- [ ] + +## Additional Context + + diff --git a/.github/ISSUE_TEMPLATE/docs--.md b/.github/ISSUE_TEMPLATE/docs--.md new file mode 100644 index 000000000..9d1c77660 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/docs--.md @@ -0,0 +1,35 @@ +--- +name: 'docs: ' +about: Template for documentation tasks +title: '[DOCS]' +labels: documentation +assignees: '' +--- + +## Description + + + +## Current Documentation + + + +## Proposed Changes + + + +## Motivation + + + +## Acceptance Criteria + + + +- [ ] +- [ ] +- [ ] + +## Additional Context + + diff --git a/.github/ISSUE_TEMPLATE/feat--.md b/.github/ISSUE_TEMPLATE/feat--.md index f73014248..8b82fd851 100644 --- a/.github/ISSUE_TEMPLATE/feat--.md +++ b/.github/ISSUE_TEMPLATE/feat--.md @@ -1,24 +1,35 @@ --- name: 'feat: ' about: Template for feature tasks -title: "[FEAT]" +title: '[FEAT]' labels: feature assignees: '' - --- ## Description + ## Acceptance Criteria + + +- [ ] +- [ ] +- [ ] + +## Purpose + + -### Purpose +## Requirements -### Requirem#ents + +## Expected Outcome -### Expected Outcome + +## Additional Context -### + diff --git a/.github/ISSUE_TEMPLATE/fix--.md b/.github/ISSUE_TEMPLATE/fix--.md new file mode 100644 index 000000000..f68c6f091 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/fix--.md @@ -0,0 +1,47 @@ +--- +name: 'fix: ' +about: Template for bug fixes +title: '[FIX]' +labels: bug +assignees: '' +--- + +## Bug Description + + + +## Steps to Reproduce + + + +1. +2. +3. + +## Expected Behavior + + + +## Current Behavior + + + +## Screenshots/Logs + + + +## Environment + + + +- OS: [e.g. Windows, macOS, Linux] +- Browser/Device: [e.g. Chrome, Firefox, iPhone] +- Version: [e.g. 22] + +## Possible Solution + + + +## Additional Context + + diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 000000000..916536a78 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,66 @@ +# Pull Request + +## Description + + + +## Related Issue + + + +Fixes #(issue) + +## Type of Change + + + +- [ ] feat: New feature +- [ ] fix: Bug fix +- [ ] docs: Documentation updates +- [ ] style: Code style/formatting changes +- [ ] refactor: Code refactoring +- [ ] perf: Performance improvements +- [ ] test: Test additions/updates +- [ ] chore: Build process or tooling changes +- [ ] ci: CI configuration changes +- [ ] other: + +## How Has This Been Tested? + + + +- [ ] Unit tests +- [ ] Integration tests +- [ ] Manual tests + +## Test Evidence + + + + +## Screenshots (if applicable) + + + +## Documentation Screenshots (if applicable) + + + + +## Checklist + + + +- [ ] My code follows the project's coding style +- [ ] I have commented my code, particularly in hard-to-understand areas +- [ ] I have made corresponding changes to the documentation +- [ ] My changes generate no new warnings +- [ ] I have added tests that prove my fix is effective or that my feature works +- [ ] New and existing unit tests pass locally with my changes +- [ ] Any dependent changes have been merged and published +- [ ] I have included a screenshot showing all tests passing +- [ ] I have included documentation screenshots (if applicable) + +## Additional Notes + + diff --git a/.gitignore b/.gitignore index d44f2bcda..1e1efcd28 100644 --- a/.gitignore +++ b/.gitignore @@ -402,3 +402,6 @@ dist *.prod +# User specific ignores +todo.txt +.vscode/ diff --git a/README.md b/README.md index 8a4c0027c..19a792da4 100644 --- a/README.md +++ b/README.md @@ -248,6 +248,36 @@ Here are some useful npm scripts that you can use during development and product - [TypeScript Documentation](https://www.typescriptlang.org/docs/) - [Express Documentation](https://expressjs.com/) +## API Documentation and Postman Integration + +### Swagger Documentation + +The API documentation is available through Swagger UI at: + +```http +http://localhost:3000/api/docs +``` + +### Postman Integration + +To import the API documentation into Postman: + +1. Access the Swagger JSON endpoint: + +```http +http://localhost:3000/api/docs-json +``` + +2. In Postman: + - Click on "Import" in the top left corner + - Select "Link" tab + - Paste the Swagger JSON URL (http://localhost:3000/api/docs-json) + - Click "Continue" and then "Import" + +This will create a new collection in Postman with all available API endpoints, making it easier to test and interact with the API. + +Note: Replace `localhost:3000` with your actual API host if different. + By following these steps, you should have your Node.js and TypeScript application up and running. If you encounter any issues, please refer to the documentation of the respective tools or seek help from the community. ## API Endpoints diff --git a/package.json b/package.json index 114478035..847f7b500 100644 --- a/package.json +++ b/package.json @@ -33,9 +33,6 @@ "postinstall": "npm install --platform=linux --arch=x64 sharp" }, "dependencies": { - "@css-inline/css-inline": "^0.14.3", - "@css-inline/css-inline-linux-x64-gnu": "^0.14.3", - "@faker-js/faker": "^9.5.0", "@google/generative-ai": "^0.22.0", "@nestjs/axios": "^4.0.0", "@nestjs/bull": "^11.0.2", @@ -78,7 +75,6 @@ "speakeasy": "^2.0.0", "supertest": "^7.0.0", "typeorm": "^0.3.20", - "typeorm-extension": "^3.6.3", "types-joi": "^2.1.0", "uuid": "^11.1.0", "xlsx": "^0.18.5" diff --git a/src/main.ts b/src/main.ts index 8ae191719..adf0c73f6 100644 --- a/src/main.ts +++ b/src/main.ts @@ -10,7 +10,7 @@ import { AppModule } from './app.module'; import { initializeDataSource } from '@database/data-source'; import { SeedingService } from '@database/seeding/seeding.service'; import { ResponseInterceptor } from '@shared/inteceptors/response.interceptor'; - +import { Request, Response } from 'express'; async function bootstrap() { const app = await NestFactory.create(AppModule, { bufferLogs: true }); @@ -45,6 +45,10 @@ async function bootstrap() { const document = SwaggerModule.createDocument(app, options); SwaggerModule.setup('api/docs', app, document); + app.use('api/docs-json', (req: Request, res: Response) => { + res.json(document); + }); + const port = app.get(ConfigService).get('server.port'); await app.listen(port);