Prerequisites
Before installing the project, ensure you have the following installed on your system:Node.js
The project requires Node.js version 20 or higher:Package manager
Choose one of the following package managers:npm
Comes bundled with Node.js
yarn
Install globally with npm
pnpm
Fast, disk space efficient
bun
All-in-one toolkit
Git
Git is required to clone the repository:Modern web browser
The application requires a modern browser with support for:- HTML5 Canvas API - For rendering the Matrix rain effect
- WebRTC MediaDevices API - For webcam access in CharCam
- ES6+ JavaScript - Modern JavaScript features
- Chrome 90+
- Firefox 88+
- Safari 14+
- Edge 90+
For the CharCam feature, you’ll need to grant camera permissions in your browser.
Installation steps
Install dependencies
Install all required packages using your preferred package manager:This will install all dependencies from
package.json:package.json
Project structure
After installation, your project structure will look like this:Key files
Root layout
Thesrc/app/layout.tsx file sets up the application-wide configuration:
src/app/layout.tsx
Available scripts
Thepackage.json includes the following scripts:
Development
Start the development server with Turbopack:next dev --turbopack which provides:
- Fast refresh for instant updates
- Optimized development builds
- Hot module replacement
Build
Create an optimized production build:next build which:
- Compiles TypeScript to JavaScript
- Optimizes and minifies code
- Generates static pages where possible
- Creates production-ready bundles
Production
Start the production server:next start to serve the production build.
You must run
npm run build before npm run start.Linting
Run ESLint to check for code quality issues:Troubleshooting
Port already in use
If port 3000 is already in use, you can specify a different port:Camera permissions denied
For the CharCam feature, ensure:- You’re accessing the site via
https://orlocalhost - Camera permissions are granted in browser settings
- No other application is using the camera
TypeScript errors
If you encounter TypeScript errors, try:Module not found errors
Ensure all dependencies are installed:Next steps
Quickstart guide
Learn how to run the application and explore its features
Deploy to production
Deploy your application to Vercel, Netlify, or your preferred hosting platform