No description
BrowserRouter without a basename sees /lusa-Back-Planner/ as the pathname, which doesn't match route path="/", so React Router falls to NotFound. Using import.meta.env.BASE_URL (set by Vite's base config) fixes both prod and dev environments. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> |
||
|---|---|---|
| .lovable | ||
| public | ||
| src | ||
| .env.example | ||
| .gitignore | ||
| apache.conf | ||
| CLAUDE.md | ||
| components.json | ||
| deploy.sh | ||
| eslint.config.js | ||
| index.html | ||
| package-lock.json | ||
| package.json | ||
| postcss.config.js | ||
| README.md | ||
| tailwind.config.ts | ||
| tsconfig.app.json | ||
| tsconfig.json | ||
| tsconfig.node.json | ||
| vite.config.ts | ||
| vitest.config.ts | ||
LUSA Back Planner
A project timeline generator for production teams. Set a deadline, pick a production lane, and get your timeline instantly. Supports PDF brief parsing, change requests, and PDF export.
Tech Stack
- Vite + React + TypeScript
- Tailwind CSS + shadcn/ui
- pdfjs-dist (client-side PDF parsing)
- jsPDF + html2canvas (PDF export)
Local Development
Requires Node.js 18+.
npm install
npm run dev
The dev server runs at http://localhost:5173.
To preview a production build locally:
npm run build
npm run preview
Deploy to Ubuntu Server (Apache)
1. Build
npm install
npm run build
This creates a dist/ folder with the static site.
2. Copy to server
scp -r dist/ user@your-server:/var/www/backplanner
3. Create Apache virtual host
Create /etc/apache2/sites-available/backplanner.conf:
<VirtualHost *:80>
ServerName your-domain.com
DocumentRoot /var/www/backplanner
<Directory /var/www/backplanner>
Options -Indexes
AllowOverride None
Require all granted
# SPA fallback - route all requests to index.html
FallbackResource /index.html
</Directory>
# Cache static assets (JS, CSS, images)
<FilesMatch "\.(js|css|png|jpg|ico|svg|woff2?)$">
Header set Cache-Control "public, max-age=31536000, immutable"
</FilesMatch>
</VirtualHost>
4. Enable and start
sudo a2enmod headers
sudo a2ensite backplanner.conf
sudo systemctl reload apache2
5. (Optional) Enable HTTPS with Let's Encrypt
sudo apt install certbot python3-certbot-apache
sudo certbot --apache -d your-domain.com
Subdirectory Deploy
If hosting under a subdirectory (e.g. your-server.com/backplanner/), set the base option in vite.config.ts before building:
export default defineConfig({
base: "/backplanner/",
// ...
});
Then use an Alias in Apache instead of a separate virtual host:
Alias /backplanner /var/www/backplanner
<Directory /var/www/backplanner>
Options -Indexes
AllowOverride None
Require all granted
FallbackResource /backplanner/index.html
</Directory>