E-medic is an online Academy.
- React
- TypeScript
- Tailwind v4
- ESLint (TypeScript/React rules)
Prerequisites: Node.js 18+ (recommend 20 LTS).
# 1) Install dependencies
npm install
# 2) Start the dev server (hot reload)
npm run dev
# 3) Type-check, build, and preview
npm run build
npm run preview
# 4) Lint the project
npm run lintBy default, Vite will print the local/dev URL (e.g., http://localhost:5173). Use Ctrl+C to stop the dev server.
dev: Start Vite dev server.build: Type-check (tsc -b) and build production assets with Vite.preview: Preview the production build locally.lint: Run ESLint across the project.
e-medic/
├─ index.html
├─ public/ # Static assets copied as-is
├─ src/
│ ├─ main.tsx # App bootstrap
│ ├─ App.tsx # Root component
│ ├─ index.css # Global styles
│ ├─ App.css # Component styles
│ └─ assets/ # Local images/fonts, etc.
├─ eslint.config.js # ESLint config
├─ tsconfig*.json # TypeScript configs
├─ vite.config.ts # Vite config (React SWC plugin)
└─ package.json
"I'd Update this as we go"
Vite exposes only variables prefixed with VITE_ to your client code.
- Create an
.envfile at the project root (you can also use.env.local,.env.development,.env.production). - Add variables like:
VITE_API_BASE_URL=https://api.example.com
VITE_FEATURE_FLAG=true
- Read them in code via
import.meta.env.VITE_API_BASE_URL.
Docs: https://vite.dev/guide/env-and-mode.html
- Build:
npm run build(outputs todist/). - Host the
dist/folder on any static host (Netlify, Vercel, GitHub Pages, S3/CloudFront, Nginx, etc.).
Notes:
- Ensure correct base path if hosting under a subpath (configure
baseinvite.config.ts). - Set any required environment variables in your hosting provider.
Please see CONTRIBUTING.md for guidelines on workflows, coding style, and PR process.