CleanFS is a modern file management application built with Next.js and Supabase that provides a secure and intuitive way to store, organize, and share files. With a focus on clean design and robust security, CleanFS offers a seamless file management experience for individuals and teams.
- Secure Authentication: User registration with admin approval system
- Role-Based Access Control: Different permissions for admins and regular users
- Hybrid Storage System:
- Primary: Supabase storage for cross-browser/device access
- Fallback: Client-side storage (localStorage + IndexedDB) when Supabase operations fail
- Intuitive File Management: Upload, download, organize, and share files with ease
- Modern UI: Clean, responsive interface built with modern web technologies
- Dark Mode Support: Comfortable viewing experience in any lighting condition
- Frontend: Next.js, React, TypeScript
- UI Components: Shadcn UI, Tailwind CSS
- Authentication: Supabase Auth
- Storage: Supabase Storage with client-side fallback
- Database: Supabase PostgreSQL
- Form Handling: React Hook Form with Zod validation
- Node.js 16.x or later
- npm or yarn
- Supabase account and project
Create a .env.local file in the root directory with the following variables:
NEXT_PUBLIC_SUPABASE_URL=your_supabase_url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key
SUPABASE_SERVICE_ROLE_KEY=your_supabase_service_role_key
# Clone the repository
git clone https://github.com/babanomania/clean-file-manager.git
cd clean-file-manager
# Install dependencies
npm install
# or
yarn install
# Run the development server
npm run dev
# or
yarn devOpen http://localhost:3000 in your browser to see the application.
Run the following SQL script in your Supabase SQL Editor to set up the necessary tables and policies:
npm run migrateOr manually run the SQL scripts in the src/migrations directory.
To create your first admin user:
npm run create:admin-simpleThis will create an admin user with:
- Email: admin@cleanfs.com
- Password: Admin123!
Important: Change this password immediately after first login!
- Users register through the signup page
- New accounts require admin approval
- Admins can approve users through the admin panel
- Once approved, users can log in and access the system
- Approve or revoke user access
- Grant or remove admin privileges
- View all registered users
npm run dev- Start the development servernpm run build- Build the application for productionnpm run start- Start the production servernpm run lint- Run ESLintnpm test- Run testsnpm run create:admin- Create a custom admin usernpm run create:sample-admin- Create a sample admin usernpm run create:admin-simple- Create an admin user with simplified processnpm run fix:admin-role- Fix admin role issues
The following features are planned for future development:
- Kubernetes Support: Add Kubernetes deployment configurations for container orchestration and scalability
- Automatic Backups: Implement scheduled automatic backups of user files and database content
- Enhanced Security: Further improve security measures for file sharing and storage
- API Documentation: Create comprehensive API documentation for integration with other services
Contributions to implement these features are welcome!
This project is licensed under the MIT License - see the LICENSE file for details.

