https://github.com/patrickgdl/goto
Attempt to communicate with the GoTo Connect APIs
https://github.com/patrickgdl/goto
express nodejs typescript
Last synced: 3 months ago
JSON representation
Attempt to communicate with the GoTo Connect APIs
- Host: GitHub
- URL: https://github.com/patrickgdl/goto
- Owner: patrickgdl
- Created: 2024-05-20T21:18:48.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-05-21T18:01:32.000Z (about 2 years ago)
- Last Synced: 2025-07-19T18:40:28.767Z (12 months ago)
- Topics: express, nodejs, typescript
- Language: TypeScript
- Homepage:
- Size: 121 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
# ๐ Express with TypeScript
## ๐ก Motivation and Intentions
Developed to streamline backend development, a solution for:
- โจ Reducing setup time for new projects.
- ๐ Ensuring code consistency and quality.
- โก Facilitating rapid development with cutting-edge tools.
- ๐ก๏ธ Encouraging best practices in security, testing, and performance.
## ๐ Features
- ๐ Modular Structure: Organized by feature for easy navigation and scalability.
- ๐จ Faster Execution with tsx: Rapid TypeScript execution with esbuild, complemented by tsc for type checking.
- ๐ Stable Node Environment: Latest LTS Node version in .nvmrc.
- ๐ง Simplified Environment Variables with Envalid: Centralized and easy-to-manage configuration.
- ๐ Path Aliases: Cleaner code with shortcut imports.
- ๐ Dependabot Integration: Automatic updates for secure and up-to-date dependencies.
- ๐ Security: Helmet for HTTP header security and CORS setup.
- ๐ Logging: Efficient logging with pino-http.
- ๐งช Comprehensive Testing: Robust setup with Vitest and Supertest.
- ๐ Code Quality Assurance: Husky and lint-staged for consistent quality.
- โ
Unified Code Style: ESLint and Prettier for a consistent coding standard.
- ๐ API Response Standardization: ServiceResponse class for consistent API responses.
- ๐ณ Docker Support: Ready for containerization and deployment.
- ๐ Input Validation with Zod: Strongly typed request validation using Zod.
- ๐งฉ API Spec Generation: Automated OpenAPI specification generation from Zod schemas to ensure up-to-date and accurate API documentation.
## ๐ ๏ธ Getting Started
### Step 1: ๐ Initial Setup
- Clone the repository: `git clone https://github.com/patrickgdl/goto`
- Navigate: `cd goto`
- Install dependencies: `npm ci`
### Step 2: โ๏ธ Environment Configuration
- Create `.env`: Copy `.env.template` to `.env`
- Update `.env`: Fill in necessary environment variables
### Step 3: ๐โโ๏ธ Running the Project
- Development Mode: `npm run dev`
- Building: `npm run build`
- Production Mode: Set `.env` to `NODE_ENV="production"` then `npm run build && npm run start`
## ๐ Project Structure
```
.
โโโ api
โ โโโ healthCheck
โ โ โโโ healthCheckRouter.ts
โ โโโ goto
โ โโโ goto-router.ts
โโโ common
โ โโโ __tests__
โ โ โโโ errorHandler.test.ts
โ โ โโโ requestLogger.test.ts
โ โโโ middleware
โ โ โโโ errorHandler.ts
โ โ โโโ requestLogger.ts
โ โโโ models
โ โ โโโ serviceResponse.ts
โ โโโ utils
โ โโโ commonValidation.ts
โ โโโ envConfig.ts
โ โโโ httpHandlers.ts
โโโ index.ts
โโโ server.ts
```