React file manager interface that talks to the Flask backend.
1.9K
React file manager interface that talks to the Flask backend.
Web interface for managing files and folders. Users can upload files, create folders, rename items, and navigate through their file system.
apps/frontend/src/
├── components/
│ ├── FileExplorer.tsx # Main file browser
│ └── Layout.tsx # App layout wrapper
├── context/
│ ├── ItemsContext.tsx # Global state
│ └── itemsReducer.ts # State updates
├── pages/
│ └── HomePage.tsx # Main page
├── services/
│ └── api.ts # Backend API calls
└── types/
└── index.ts # TypeScript definitions
Uses Preact Signals instead of React state. Benefits:
// Global signals for file data
const items = signal([]);
const currentPath = signal('/');
const loading = signal(false);
FileExplorer - Main component that shows:
Layout - Wraps the app with:
All backend calls go through services/api.ts:
// Get folder contents
const getItems = (parentId?: string) =>
fetch('/api/filesystem?parent_id=' + parentId)
// Upload file
const uploadFile = (file: File, parentId?: string) =>
fetch('/api/filesystem/upload', { method: 'POST', ... })
Uses Auth0 for login. Set VITE_TEST_MODE=true to skip auth during development.
Create apps/frontend/.env:
VITE_API_URL=http://localhost:5000/api
VITE_TEST_MODE=false
VITE_AUTH0_DOMAIN=your-tenant.auth0.com
VITE_AUTH0_CLIENT_ID=your-client-id
VITE_AUTH0_AUDIENCE=your-api-identifier
Start dev server:
cd apps/frontend
npm run dev
Build for production:
cd apps/frontend
npm run build
Type checking:
cd apps/frontend
npm run type-check
Uses Tailwind CSS utility classes. No custom CSS files needed.
Examples:
bg-blue-500 - Blue backgroundtext-white - White textp-4 - Paddingrounded-lg - Rounded cornersBuilds to static files in dist/ folder. Nginx serves the files and proxies API calls to the backend.
API calls fail:
Auth not working:
Build fails:
npm run type-check firstContent type
Image
Digest
sha256:172cd086f…
Size
25 MB
Last updated
3 months ago
docker pull h4mid2019/flask-react-frontend