Vtorio LLC

vtugulan adcda6fc74 refactor(cintas-import): remove automatic summary generation after data import 10 luni în urmă
.kilocode 5bffc8a922 feat: add mcp.json configuration for context7 and sequentialthinking servers 10 luni în urmă
.vscode dad53e4369 WIP 10 luni în urmă
app adcda6fc74 refactor(cintas-import): remove automatic summary generation after data import 10 luni în urmă
components 3d1f510cd2 feat(db): add layout configuration models and enable database connection 10 luni în urmă
hooks 1e60f50162 feat: add UI components for card, dropdown menu, form, input, label, navigation menu, select, skeleton, table, textarea, toast, and toaster 10 luni în urmă
lib 3d1f510cd2 feat(db): add layout configuration models and enable database connection 10 luni în urmă
prisma 74757ba6f1 fix(db): update cintas summary procedure with camelCase column names and improved null handling 10 luni în urmă
public b4803eacbd docs: update implementation plan for Cintas Install Calendar Summary feature 10 luni în urmă
.dockerignore 0c574399e1 Initial commit after add content from prior repo. 10 luni în urmă
.env 3d1f510cd2 feat(db): add layout configuration models and enable database connection 10 luni în urmă
.env.local 6f6370b7ce fix(env): comment out DATABASE_URL in .env and move it to the end of .env.local 10 luni în urmă
.gitignore a40c2826df feat(env): add environment configuration files for database and Kinde authentication 10 luni în urmă
DATABASE_SETUP.md 87d3d5b65d feat: persist uploads in PostgreSQL via Prisma ORM 10 luni în urmă
Dockerfile 0c574399e1 Initial commit after add content from prior repo. 10 luni în urmă
IMPLEMENTATION_PLAN.md b4803eacbd docs: update implementation plan for Cintas Install Calendar Summary feature 10 luni în urmă
KINDE_SETUP.md 5b63d4ae5a feat: integrate Kinde authentication into Next.js application 10 luni în urmă
README.md f8dc85ec91 docs: replace default Next.js README with comprehensive project documentation 10 luni în urmă
components.json 1e60f50162 feat: add UI components for card, dropdown menu, form, input, label, navigation menu, select, skeleton, table, textarea, toast, and toaster 10 luni în urmă
docker-compose.yml 87d3d5b65d feat: persist uploads in PostgreSQL via Prisma ORM 10 luni în urmă
eslint.config.mjs 0c574399e1 Initial commit after add content from prior repo. 10 luni în urmă
middleware.ts 745b56f4f0 fix(middleware): update import path for withAuth and refactor middleware function 10 luni în urmă
next.config.ts 54b8921346 feat(imports): add file upload functionality to import creation process 10 luni în urmă
package-lock.json ccf17c8815 WIP 10 luni în urmă
package.json ccf17c8815 WIP 10 luni în urmă
postcss.config.mjs 0c574399e1 Initial commit after add content from prior repo. 10 luni în urmă
tailwind.config.ts 1e60f50162 feat: add UI components for card, dropdown menu, form, input, label, navigation menu, select, skeleton, table, textarea, toast, and toaster 10 luni în urmă
test-upload.html 87d3d5b65d feat: persist uploads in PostgreSQL via Prisma ORM 10 luni în urmă
tsconfig.json 0c574399e1 Initial commit after add content from prior repo. 10 luni în urmă

README.md

Vtorio - File Upload & Management System

A Next.js-based file upload and management system with PostgreSQL database storage and comprehensive API documentation.

Features

  • File Upload: Upload files via web interface or API
  • File Management: List, view, and download uploaded files
  • Database Storage: Files stored in PostgreSQL with metadata
  • API Documentation: Interactive Swagger/OpenAPI documentation
  • REST API: Full RESTful API for programmatic access

Quick Start

Prerequisites

  • Node.js 18+
  • PostgreSQL database
  • npm or yarn

Installation

  1. Clone the repository
  2. Install dependencies:

    npm install
    
  3. Set up environment variables:

    cp .env.example .env
    # Edit .env with your database credentials
    
  4. Set up the database:

    npx prisma migrate dev
    
  5. Start the development server:

    npm run dev
    

The application will be available at http://localhost:3000 (or next available port).

API Documentation

Interactive Documentation

Visit http://localhost:3000/api-docs for interactive Swagger UI documentation where you can:

  • Test all API endpoints
  • Upload files via the web interface
  • View response schemas and examples
  • Download files directly

API Endpoints

Method Endpoint Description
POST /api/upload Upload a file (multipart/form-data)
GET /api/files List all uploaded files with metadata
GET /api/files/{id} Download a specific file by ID
GET /api/openapi.json Raw OpenAPI specification

Example Usage

Upload a file via curl:

curl -X POST http://localhost:3000/api/upload \
  -F "file=@/path/to/your/file.pdf"

List all files:

curl http://localhost:3000/api/files

Download a file:

curl http://localhost:3000/api/files/{file-id} --output downloaded-file.pdf

Database Schema

The application uses Prisma ORM with the following schema:

  • File: Stores file data and metadata
    • id: Unique identifier
    • filename: Original filename
    • mimetype: MIME type of the file
    • size: File size in bytes
    • data: Binary file content
    • createdAt: Upload timestamp
    • updatedAt: Last update timestamp

Development

Database Management

# Reset database
npx prisma migrate reset

# View database
npx prisma studio

# Generate new migration
npx prisma migrate dev --name your-migration-name

Environment Variables

Create a .env file with:

DATABASE_URL="postgresql://username:password@localhost:5432/vtorio"

Deployment

Docker

# Build and run with Docker Compose
docker-compose up --build

Vercel

  1. Push to GitHub
  2. Import project on Vercel
  3. Add environment variables
  4. Deploy

Technologies Used

  • Next.js 15 - React framework
  • TypeScript - Type safety
  • PostgreSQL - Database
  • Prisma - ORM
  • Tailwind CSS - Styling
  • Swagger UI - API documentation
  • Docker - Containerization

License

MIT License - see LICENSE file for details.