Skip to content

A RESTful API for managing your favorite development tools. VUTTR allows users to create, read, update, and delete tools with their respective names, links, descriptions, and tags.

Notifications You must be signed in to change notification settings

Cr-Israel/VUTTR

Repository files navigation

VUTTR (Very Useful Tools to Remember) API

TypeScript Fastify Prisma Vitest Swagger

A RESTful API for managing your favorite development tools. VUTTR allows users to create, read, update, and delete tools with their respective names, links, descriptions, and tags.

Tech Stack

  • Runtime: Node.js
  • Framework: Fastify
  • Language: TypeScript
  • ORM: Prisma
  • Database: PostgreSQL
  • Testing: Vitest
  • Documentation: Swagger/OpenAPI
  • Authentication: JWT
  • Validation: Zod

Prerequisites

Before you begin, ensure you have the following installed:

  • Node.js (v18 or higher)
  • npm or yarn
  • PostgreSQL
  • Git

Installation

  1. Clone the repository:
git clone https://github.com/yourusername/vuttr-api.git
cd vuttr-api
  1. Install dependencies:
npm install
# or
yarn install
  1. Set up the database:
# Generate Prisma client
npm run prisma:generate
# Run migrations
npm run prisma:migrate

Environment Variables

Create a .env file in the root directory and add the following variables:

# Application
PORT=3000
NODE_ENV=development

# Database
DATABASE_URL="postgresql://user:password@localhost:5432/vuttr?schema=public"

# Authentication
JWT_SECRET=your_jwt_secret

Running the Application

Development Mode

npm run dev
# or
yarn dev

Production Mode

npm run build
npm start
# or
yarn build
yarn start

The API will be available at http://localhost:3000

Testing

Running Unit Tests

npm run test
# or
yarn test

Running E2E Tests

npm run test:e2e
# or
yarn test:e2e

Test Coverage

npm run test:coverage
# or
yarn test:coverage

API Documentation

The API documentation is available through Swagger UI when the application is running:

Main Endpoints

  • POST /tool - Create a new tool
  • GET /tools - List all tools
  • GET /tools?tag=node - Search tools by tag
  • DELETE /tool/:id - Delete a tool
  • POST /user - Register a new user
  • POST /sessions - Authenticate user

For detailed request/response examples and schemas, please refer to the Swagger documentation.

Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

A RESTful API for managing your favorite development tools. VUTTR allows users to create, read, update, and delete tools with their respective names, links, descriptions, and tags.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published