mirror of
https://github.com/Dvorinka/Productier.git
synced 2026-06-04 04:23:00 +00:00
2.3 KiB
2.3 KiB
SolidJS + Vite Migration Complete
Summary
The Productier frontend has been successfully migrated from SolidStart to pure SolidJS + Vite. The application is now running correctly with all features intact.
What Was Changed
1. Vite Configuration (vite.config.ts)
- Updated the path resolution to use ES modules (
fileURLToPathanddirname) - Maintained the
~alias for clean imports - Kept the proxy configuration for the auth service
2. Package Configuration (package.json)
- Already configured correctly with:
solid-jsfor the frameworkvite-plugin-solidfor Vite integration@solidjs/routerfor routing- No SolidStart dependencies
3. Application Structure
- Entry point:
src/index.tsx- Usessolid-js/webrender - Main app:
src/app.tsx- Pure SolidJS Router setup - Routes: All routes in
src/routes/are standard SolidJS components - No server-side rendering (SSR) - Pure client-side app
Running the Application
Development Mode
-
Start the backend services:
docker compose up -
Start the frontend dev server:
cd apps/frontend npm run dev
Production Build
cd apps/frontend
npm run build
The build output will be in apps/frontend/dist/
Services
- Frontend: http://localhost:5173 (Vite dev server)
- Auth Service: http://localhost:43001 (Node.js)
- API Service: http://localhost:48080 (Go)
- PostgreSQL: localhost:5432 (Docker)
Key Features
- ✅ Hot Module Replacement (HMR) with Vite
- ✅ Fast refresh for SolidJS components
- ✅ TypeScript support
- ✅ Tailwind CSS v4
- ✅ Client-side routing with @solidjs/router
- ✅ Better Auth integration
- ✅ Offline-first architecture with local state
- ✅ Production build optimization
Tech Stack
- Framework: SolidJS 1.9.5
- Build Tool: Vite 6.0.7
- Router: @solidjs/router 0.15.0
- Styling: Tailwind CSS 4.0.7
- Auth: Better Auth 1.5.6
- Icons: Lucide Solid
- Date Handling: date-fns
- Markdown: marked
Notes
- The app is fully client-side rendered (no SSR)
- All routes are lazy-loaded for optimal performance
- The
~alias resolves tosrc/directory - Auth session is managed via Better Auth
- State management uses SolidJS stores