No description
Find a file
Vadym Samoilenko ed638ff8cd Fix MSAL interaction_in_progress and redirect URI mismatch
- Refactor auth init: initialize MSAL before React mounts so MsalProvider
  handles handleRedirectPromise exactly once (no double-calls, no stale locks)
- Simplify AuthGuard to pure AuthenticatedTemplate/UnauthenticatedTemplate
- Remove trailing slash from redirect URI to match Azure AD registration

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-16 11:46:41 +00:00
.lovable Initial commit: LUSA Back Planner 2026-03-06 13:25:24 -05:00
public Initial commit: LUSA Back Planner 2026-03-06 13:25:24 -05:00
src Fix MSAL interaction_in_progress and redirect URI mismatch 2026-03-16 11:46:41 +00:00
.env.example Fix MSAL interaction_in_progress and redirect URI mismatch 2026-03-16 11:46:41 +00:00
.gitignore add msal sso-page and env 2026-03-13 08:32:11 +05:30
apache.conf Add Azure AD SSO (MSAL) and deployment config 2026-03-09 18:41:56 +00:00
CLAUDE.md add msal sso-page-error 2026-03-16 16:28:47 +05:30
components.json Initial commit: LUSA Back Planner 2026-03-06 13:25:24 -05:00
deploy.sh Fix MSAL SSO redirect and add deploy script 2026-03-16 11:38:56 +00:00
eslint.config.js Initial commit: LUSA Back Planner 2026-03-06 13:25:24 -05:00
index.html Initial commit: LUSA Back Planner 2026-03-06 13:25:24 -05:00
package-lock.json add msal sso-page and env 2026-03-13 08:32:11 +05:30
package.json add msal sso-page and env 2026-03-13 08:32:11 +05:30
postcss.config.js Initial commit: LUSA Back Planner 2026-03-06 13:25:24 -05:00
README.md Initial commit: LUSA Back Planner 2026-03-06 13:25:24 -05:00
tailwind.config.ts Initial commit: LUSA Back Planner 2026-03-06 13:25:24 -05:00
tsconfig.app.json Initial commit: LUSA Back Planner 2026-03-06 13:25:24 -05:00
tsconfig.json Initial commit: LUSA Back Planner 2026-03-06 13:25:24 -05:00
tsconfig.node.json Initial commit: LUSA Back Planner 2026-03-06 13:25:24 -05:00
vite.config.ts Fix MSAL SSO redirect and add deploy script 2026-03-16 11:38:56 +00:00
vitest.config.ts Initial commit: LUSA Back Planner 2026-03-06 13:25:24 -05:00

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>