A modern, developer-focused file sharing platform built with Next.js and shadcn/ui. This platform provides a clean, terminal-inspired interface for uploading and sharing files, with both web and CLI interfaces.
- 🚀 Modern terminal-inspired UI
- 📁 Drag-and-drop file uploads
- 🔄 Real-time upload progress
- 🔗 Instant share links
- 🛠️ Configurable chunk sizes
- 💻 CLI command generation
- 🌐 Multiple storage backends (OneDrive)
- Node.js 18+
- npm or yarn
- ksau-go CLI (optional, for CLI usage)
-
Clone the repository:
git clone https://github.com/yourusername/ksau-web.git cd ksau-web
-
Install dependencies:
npm install # or yarn install
-
Configure environment variables:
cp .env.example .env.local
Edit
.env.local
and updateNEXT_PUBLIC_API_ENDPOINT
to point to your API server. -
Run the development server:
npm run dev # or yarn dev
-
Open http://localhost:3000 in your browser.
-
Push your code to a GitHub repository
-
Connect your repository to Vercel:
- Go to Vercel
- Click "New Project"
- Import your repository
- Configure environment variables:
- Add
NEXT_PUBLIC_API_ENDPOINT
with your production API URL
- Add
-
Deploy:
- Vercel will automatically deploy your project
- It will also deploy automatically on every push to main
NEXT_PUBLIC_API_ENDPOINT
: Your API endpoint URL- Development:
http://localhost:8080
- Production: Your actual API URL
- Development:
ksau-web/
├── app/ # Next.js app directory
│ ├── globals.css # Global styles
│ ├── layout.tsx # Root layout
│ └── page.tsx # Main upload interface
├── components/ # UI components
│ └── ui/ # shadcn/ui components
├── hooks/ # Custom React hooks
├── lib/ # Utility functions
├── .env.example # Example environment variables
├── .gitignore # Git ignore rules
└── package.json # Project dependencies
-
Environment Variables
- Always use environment variables for configurable values
- Keep
.env.example
updated with new variables
-
Code Style
- Follow TypeScript best practices
- Use
use client
directive for client components - Keep components modular and reusable
-
Backend Integration
- All API calls should use the
NEXT_PUBLIC_API_ENDPOINT
- Implement proper error handling
- Show loading states during operations
- All API calls should use the
- Files are stored on a best-effort basis
- Storage cleanup occurs at 90% capacity
- Contact maintainers for file deletion requests
- Intended for development and testing files only
This web interface works alongside the ksau-go CLI tool. The interface shows equivalent CLI commands for each operation, making it easy to switch between web and CLI usage.
This project can be run using Docker and Docker Compose.
- Docker
- Docker Compose
- Ensure Docker is running on your system.
- Navigate to the root of the project directory.
- To build and run the application:
This will build the Docker image and start the Next.js application, accessible at
docker-compose up --build
http://localhost:3000
.
You can configure the API endpoints by uncommenting and setting the environment
variables in docker-compose.yml
:
NEXT_PUBLIC_LOCAL_API_ENDPOINT
: Use this for a local backend (e.g.,http://localhost:8080
). This takes precedence overNEXT_PUBLIC_API_ENDPOINT
andNEXT_PUBLIC_API_BASE_URL
.NEXT_PUBLIC_API_ENDPOINT
: Use this for a remote backend (e.g.,https://project.ksauraj.eu.org
). This is a fallback ifNEXT_PUBLIC_LOCAL_API_ENDPOINT
is not set.NEXT_PUBLIC_API_BASE_URL
: This environment variable is used for Next.js rewrites to proxy API calls. It should point to the base URL of your API backend (e.g.,https://project.ksauraj.eu.org
orhttp://localhost:8080
).
Example docker-compose.yml
for local backend:
services:
nextjs-app:
environment:
NEXT_PUBLIC_LOCAL_API_ENDPOINT: "http://localhost:8080"
NODE_ENV: production
Example docker-compose.yml
for remote backend:
services:
nextjs-app:
environment:
NEXT_PUBLIC_API_ENDPOINT: "https://project.ksauraj.eu.org"
NODE_ENV: production
To stop the Docker containers:
docker-compose down
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
- ksauraj
- hakimi
- pratham
This project is open-source and available under the MIT License.