Prerequisites
Before you begin, ensure you have the following installed:- Node.js (v14 or higher)
- npm (comes with Node.js)
- Git for version control
Getting Started
Follow these steps to set up Readme.so locally:Fork and Clone the Repository
First, fork the repository on GitHub, then clone it to your local machine:
Install Dependencies
Install all project dependencies using npm:This will install all dependencies listed in
package.json, including:- Next.js 16
- React 19
- Tailwind CSS 3
- dnd-kit for drag and drop
- Monaco Editor for code editing
- i18next for internationalization
Start the Development Server
Available Scripts
The project includes several npm scripts for development:Script Details
npm run dev- Starts the Next.js development server with hot reloadnpm run build- Creates an optimized production buildnpm start- Starts the production server (runnpm run buildfirst)npm test- Runs Jest tests oncenpm test:watch- Runs Jest in watch mode for continuous testingnpm run lint- Runs ESLint and Prettier to check code qualitynpm run format- Formats code with Prettier and stages changes
Environment Setup
Readme.so works out of the box without additional environment variables. However, you may want to configure certain aspects:Local Storage
The application uses browser localStorage to:- Persist user’s readme sections
- Store editor preferences
- Save dark mode settings
- Cache section templates
PWA Configuration
The project includes PWA support vianext-pwa. To test PWA features:
- Build the production version:
npm run build - Start the production server:
npm start - Access the app in your browser
- Look for the “Install” prompt or check browser developer tools
Troubleshooting
Port Already in Use
If port 3000 is already in use:Module Not Found Errors
If you encounter missing module errors:Build Failures
If the build fails:- Check that you’re using Node.js v14 or higher:
node --version - Ensure all dependencies are installed:
npm install - Clear the Next.js cache:
rm -rf .next - Try building again:
npm run build
Husky Git Hooks Issues
The project uses Husky for git hooks. If you encounter issues:Next Steps
Now that your local environment is set up:Architecture
Understand the project structure and data flow
Contributing
Learn how to contribute to the project
Testing
Write and run tests for your changes