video_2.mp4
- Overview
β οΈ Important Notice- π Features
- π§ Technical Stack
- π Getting Started
- ποΈ Project Structure
- π¦ Components Deep Dive
- π API Documentation
- ποΈ Database Schema
- π οΈ Development Guide
- π Deployment
- π Security Considerations
- π€ Contributing
- π License
- π€ Author
Lap Machines is a sophisticated file management system that enables rapid file uploads and downloads through a modern web interface. Built with a powerful stack of Go, React with TypeScript, and PostgreSQL, this project demonstrates a production-ready application with containerized deployment capabilities.
Mobile Responsiveness: Please note that this application is currently optimized for desktop use only and is not mobile-responsive. Mobile users may experience layout issues or reduced functionality. Contributors are welcome to fork the project and add mobile responsiveness.
-
Fast File Operations
- Rapid file uploads with progress tracking
- Instant downloads with proper content-type handling
- Multiple file selection support
- Drag and drop interface
-
Smart Storage Management
- Automatic file type detection
- File metadata tracking
- Storage usage statistics
- UUID-based file identification
-
Security Features
- Secure file storage
- File type validation
- Size limit enforcement
- CORS configuration
-
User Interface
- Clean, modern design
- Real-time upload progress
- File type icons
- Sort and filter capabilities
- Dark/Light theme support
- React 18.x with TypeScript
- Vite for build tooling
- TailwindCSS for styling If ShadCN fails to set up TailwindCSS properly, switch to this approach
- Shadcn UI components for vite
- File handling libraries React FilePond
- Nginx for serving static content
- Go 1.24
- Standard net/http package
- PostgreSQL driver
- File system operations
- RESTful API design
- PostgreSQL 14
- UUID extension
- Optimized schema design
- Docker & Docker Compose
- Nginx configuration
- Environment management
- Volume persistence
-
Install Docker & Docker Compose
# Verify installations docker --version docker-compose --version -
Ensure ports 5173 (frontend), 8080 (backend), and 5433 (database) are available
-
At least 1GB of free disk space
-
Clone the Repository
git clone https://github.com/ANSHPG/Lap-Machines.git cd Lap-Machines/Production_server -
Environment Setup
# Create .env file in Ashyft directory cp Ashyft/.env.example Ashyft/.env # Update environment variables if needed
-
Build and Run
docker-compose up --build
-
Verify Installation
- Frontend: http://localhost:5173
- Backend API: http://localhost:8080/health
- Database: Port 5433 (use any PostgreSQL client)
File: Ashyft/.env
VITE_API_URL=http://localhost:8080
VITE_MAX_FILE_SIZE=100000000Environment variables in docker-compose.yml:
DB_HOST=db
DB_USER=postgres
DB_PASSWORD=your_password
DB_NAME=file_manager
PORT=8080Production_server/
βββ Ashyft/ # Frontend application
β βββ src/ # Source code
β βββ public/ # Static assets
β βββ Dockerfile # Frontend container
βββ Backend/ # Go backend
β βββ main.go # Entry point
β βββ Dockerfile # Backend container
βββ Postgres/ # Database
β βββ init.sql # Schema
β βββ file_manager.md # Documentation
βββ docker-compose.yml # Container orchestration
- File Uploader: Handles file selection and upload
- File List: Displays uploaded files with metadata
- Storage Stats: Shows system usage statistics
- Theme Switcher: Manages application theme
- File Handler: Processes file operations
- Database Manager: Handles data persistence
- Stats Collector: Gathers system statistics
GET /api/files # List all files
POST /api/upload # Upload new file(s)
GET /api/download # Download a file
DELETE /api/files/:id # Delete a file
GET /api/stats # Get storage statistics
CREATE TABLE files (
file_id UUID PRIMARY KEY DEFAULT uuid_generate_v4(),
name TEXT NOT NULL,
type TEXT NOT NULL,
size BIGINT NOT NULL,
location TEXT NOT NULL,
uploaded_at TIMESTAMP DEFAULT NOW()
);-
Frontend Development
cd Ashyft npm install npm run dev -
Backend Development
cd Backend go mod download go run main.go -
Database Setup
# See Postgres/file_manager.md for setup instructions
- Frontend: ESLint + Prettier configuration
- Backend: Go standard formatting
- SQL: PostgreSQL standard style
- Update environment variables
- Build images:
docker-compose build
- Deploy:
docker-compose up -d
- 1GB RAM minimum
- 10GB storage recommended
- Linux-based OS preferred
- File validation on upload
- Size limitations
- Secure file storage
- Database security
- API rate limiting (recommended)
Contributions are welcome! Feel free to:
- Fork the repository
- Create your feature branch
- Commit your changes
- Push to the branch
- Open a Pull Request
Areas for improvement:
- Mobile responsiveness
- Additional file type support
- Enhanced security features
- Performance optimizations
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.
Anshuman Pattnaik
- LinkedIn: @anshphere
- GitHub: @ANSHPG
If you find this project useful, please consider giving it a βοΈ on GitHub!
Note: For the latest updates and detailed contribution guidelines, please visit the GitHub repository.

