Get Started
Follow this guide to set up and run MC World Compressor on your local machine. You’ll have the application running in under 5 minutes.This quickstart covers the frontend setup. You’ll need a running backend instance to fully test world compression. The backend URL should be configured via environment variables.
Prerequisites
Before you begin, make sure you have:- Node.js 18+ installed (Download Node.js)
- npm, yarn, or pnpm package manager
- Git for cloning the repository
- A backend instance URL (or run the backend locally)
Installation Steps
Clone the Repository
Clone the MC World Compressor frontend repository from GitHub:This will download the source code and navigate into the project directory.
Install Dependencies
Install the required npm packages using your preferred package manager:This will install:
- Next.js 16+ - React framework
- React 19 - UI library
- TailwindCSS 4 - Styling framework
- next-sitemap - Sitemap generation
Configure Environment Variables
Create a Add the following environment variable to your Replace
.env file in the root directory by copying the example file (if available) or creating it manually:.env file:.env
https://your-backend-url.com with your actual backend URL.Why NEXT_PUBLIC_ prefix?
Why NEXT_PUBLIC_ prefix?
In Next.js, environment variables prefixed with
NEXT_PUBLIC_ are exposed to the browser. This is necessary because the frontend makes direct API calls to the backend from the client side.Variables without this prefix are only available server-side.Run the Development Server
Open in Browser
Navigate to http://localhost:3000 in your web browser.You should see the MC World Compressor homepage with:
- Welcome message and compression statistics
- Upload button
- “How it works” section
- FAQ section
Verify Installation
Once the application is running, verify that everything works:Check the Homepage
Check the Homepage
Visit
http://localhost:3000 and ensure:- The page loads without errors
- The navigation bar appears
- The language selector works (EN/ES/HI/AR)
- The “Compress Now” button is visible
Test Language Switching
Test Language Switching
Click the language selector in the navigation bar and switch between:
- English (EN)
- Spanish (ES)
- Hindi (HI)
- Arabic (AR)
Navigate to Upload Page
Navigate to Upload Page
Build for Production
When you’re ready to deploy or test a production build:Build the Application
Create an optimized production build:This will:
- Compile and optimize all pages
- Generate static assets
- Create a sitemap (via
next-sitemap)
Start the Production Server
Environment Configuration
Required Variables
The URL of your backend server that handles file uploads and compression.Example:
https://api.mccompressor.comBackend Requirements
Your backend must:- Accept POST requests to
/api/subirfor chunked file uploads - Support multipart/form-data uploads
- Handle files up to 4GB in size
- Integrate with the thanos library
- Return job/server IDs for status tracking
Common Issues
HTTPS Mixed Content Error
HTTPS Mixed Content Error
Error: “Mixed content” or “blocked by CORS”Solution: Ensure your backend uses HTTPS if the frontend is served over HTTPS. Update
NEXT_PUBLIC_BACKEND_URL to use https:// instead of http://.Backend Connection Failed
Backend Connection Failed
Error: Upload fails or times outSolution:
- Verify the backend URL in
.envis correct - Check that the backend server is running
- Test the backend API endpoint directly using curl or Postman
- Check CORS configuration on the backend
Port Already in Use
Port Already in Use
Error: “Port 3000 is already in use”Solution: Either stop the process using port 3000, or run Next.js on a different port:
Module Not Found
Module Not Found
Error: “Cannot find module” or “Module not found”Solution: Delete
node_modules and reinstall:Project Structure
Understanding the project structure helps you navigate the codebase:Key Files
Homepage
Location:
app/[locale]/page.js:1Main landing page with compression info, examples, and FAQ.Upload Page
Location:
app/[locale]/upload/page.js:1File upload interface with drag-and-drop and chunked transfer.Translations
Location:
lib/translations.jsMulti-language translation system for EN/ES/HI/AR.Package Config
Location:
package.json:1Dependencies: Next.js 16+, React 19, TailwindCSS 4.Next Steps
Now that you have MC World Compressor running locally, explore these topics:Development Setup
Deep dive into the development environment and best practices.
Configuration Guide
Learn about all available configuration options.
Understanding Compression
How the compression algorithm works under the hood.
Deployment Guide
Deploy your instance to production (Vercel, AWS, etc.).
File Upload Component
Understand the chunked file upload implementation.
Internationalization
Add new languages or modify existing translations.
Need Help? Check the GitHub Issues or create a new issue if you encounter problems.
