RESTful API service for analyzing product reviews and detecting potentially fake or misleading content.
This API serves as the backend for the TrueStar browser extension, providing product review analysis capabilities powered by OpenAI's language models.
- Framework: Fastify (Node.js)
- Language: TypeScript
- Validation: Zod schemas
- API Documentation: OpenAPI 3.1 specification
The OpenAPI specification (openapi.yaml
) serves as the single source of truth for the API contract. The @truestarhq/shared-types
package uses the spec file to generate TypeScript types and Zod validation schemas, ensuring type safety and consistency across all TrueStar services.
# Install dependencies
pnpm install
# Start development server
pnpm dev
# Run tests
pnpm test
# Build for production
pnpm build
The API is containerized using Docker and deployed to Google Cloud Run using GitHub Actions. See Dockerfile
for the container configuration.
OPENAI_API_KEY
(required): API key for OpenAI servicesPORT
: Server port (default: 8080)NODE_ENV
: Environment mode (development/production)