Skip to content

Tender Zen Documentation

This directory contains the VitePress documentation for Tender Zen. The documentation is configured as an independent package that can be deployed separately from the main application.

Development

Local Development

From the repository root:

bash
npm run docs:dev

Or from this directory:

bash
npm install
npm run dev

The documentation will be available at http://localhost:5173.

Build Locally

From the repository root:

bash
npm run docs:build

Or from this directory:

bash
npm install
npm run build

The built site will be in .vitepress/dist.

Preview Production Build

From the repository root:

bash
npm run docs:preview

Or from this directory:

bash
npm run preview

Vercel Deployment

Setup Instructions

  1. Create a new Vercel project for the documentation

  2. Configure the following settings:

    • Root Directory: docs
    • Framework Preset: VitePress
    • Build Command: npm run build (auto-detected)
    • Output Directory: .vitepress/dist (auto-detected)
    • Install Command: npm install (auto-detected)
  3. Configure deployment branches (optional):

    • Production Branch: main
    • Enable automatic deployments for pull requests

Vercel Configuration

The documentation is configured as a standalone package with its own package.json. This ensures:

  • Fast builds: Only VitePress dependencies are installed (~50MB vs ~500MB+ for the full app)
  • Efficient deployments: Vercel only rebuilds when files in the /docs directory change
  • Clean separation: Documentation is independent from the main application

Environment Variables

No environment variables are required for the documentation site.

Project Structure

docs/
├── .vitepress/
│   ├── config.ts          # VitePress configuration
│   ├── theme/             # Custom theme files
│   │   ├── index.ts       # Theme entry point
│   │   └── style.css      # Custom styles
│   ├── cache/             # Build cache (gitignored)
│   └── dist/              # Build output (gitignored)
├── .gitignore             # Ignores node_modules, cache, dist
├── package.json           # Independent package configuration
├── README.md              # This file
├── index.md               # Documentation home page
└── *.md                   # Other documentation pages

Maintenance

Updating VitePress

To update VitePress to the latest version:

bash
cd docs
npm update vitepress

Adding Dependencies

If you need to add additional VitePress plugins or dependencies:

bash
cd docs
npm install <package-name> --save-dev

Troubleshooting

Build Fails on Vercel

  1. Verify the root directory is set to docs
  2. Check that the build command is npm run build
  3. Ensure the output directory is .vitepress/dist
  4. Review the Vercel build logs for specific errors

Local Development Issues

  1. Ensure you've run npm install in the /docs directory
  2. Clear the cache: rm -rf .vitepress/cache
  3. Try removing node_modules and reinstalling: rm -rf node_modules && npm install

Changes Not Reflected

  1. For development: The dev server should hot-reload automatically
  2. For production: Clear the .vitepress/cache directory and rebuild

Resources

Tender Zen - Intelligente Ausschreibungssuche für das Bauwesen