mirror of
https://github.com/Dvorinka/Productier.git
synced 2026-06-04 04:23:00 +00:00
first commit
This commit is contained in:
@@ -0,0 +1,88 @@
|
||||
# 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 (`fileURLToPath` and `dirname`)
|
||||
- Maintained the `~` alias for clean imports
|
||||
- Kept the proxy configuration for the auth service
|
||||
|
||||
### 2. Package Configuration (`package.json`)
|
||||
- Already configured correctly with:
|
||||
- `solid-js` for the framework
|
||||
- `vite-plugin-solid` for Vite integration
|
||||
- `@solidjs/router` for routing
|
||||
- No SolidStart dependencies
|
||||
|
||||
### 3. Application Structure
|
||||
- Entry point: `src/index.tsx` - Uses `solid-js/web` render
|
||||
- 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
|
||||
|
||||
1. Start the backend services:
|
||||
```bash
|
||||
docker compose up
|
||||
```
|
||||
|
||||
2. Start the frontend dev server:
|
||||
```bash
|
||||
cd apps/frontend
|
||||
npm run dev
|
||||
```
|
||||
|
||||
3. Open http://localhost:5173
|
||||
|
||||
### Production Build
|
||||
|
||||
```bash
|
||||
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 to `src/` directory
|
||||
- Auth session is managed via Better Auth
|
||||
- State management uses SolidJS stores
|
||||
Reference in New Issue
Block a user