README & Documentation: Your Project's Business Card
A project without a README is like a shop without a sign — passersby have no idea what you're selling.
Why Is the README So Important?
You open an unfamiliar project on GitHub. What's the first thing you look at?
The README.
The README is the project's "first impression." It determines:
- Whether people will use your project
- Whether collaborators can get started quickly
- What interviewers think when they see your project
- Whether GitHub recommends it and gives it a star
A good README can earn you hundreds of stars; a project without one will almost certainly go unnoticed.
README Template
Here's a complete README template covering all the essential sections:
# Project Name 🚀
One sentence explaining what this project does.

## ✨ Features
- Feature one: description
- Feature two: description
- Feature three: description
## 🛠️ Tech Stack
- **Frontend**: Next.js 14, React, TypeScript
- **Styling**: Tailwind CSS
- **Backend**: Next.js API Routes
- **Database**: Supabase (PostgreSQL)
- **Deployment**: Vercel
## 📦 Installation
### Prerequisites
- Node.js 18+
- npm or yarn or pnpm
### Setup Steps
```bash
# 1. Clone the repository
git clone https://github.com/yourusername/your-project.git
# 2. Enter the project directory
cd your-project
# 3. Install dependencies
npm install
# 4. Configure environment variables
cp .env.example .env.local
# Edit .env.local with your configuration
# 5. Start the development server
npm run dev
```
Open http://localhost:3000 to view the project.
## 📖 Usage
### Basic Usage
Describe the most common use cases.
### Advanced Features
Describe advanced functionality.
## 📁 Project Structure
```
src/
├── app/ # Page routes
├── components/ # React components
├── lib/ # Utility functions
└── types/ # TypeScript types
```
## 🤝 Contributing
Contributions are welcome! Please read [CONTRIBUTING.md](./CONTRIBUTING.md) for details.
1. Fork this repository
2. Create your branch (`git checkout -b feature/amazing-feature`)
3. Commit your changes (`git commit -m 'feat: add some feature'`)
4. Push to the branch (`git push origin feature/amazing-feature`)
5. Create a Pull Request
## 📄 License
This project is licensed under the MIT License - see the [LICENSE](./LICENSE) file for details
## 👏 Acknowledgments
- [Next.js](https://nextjs.org/)
- [Tailwind CSS](https://tailwindcss.com/)
- [Supabase](https://supabase.com/)
Section-by-Section Breakdown
Project Title and Introduction
# Orange Notes 🍊
A clean online note-taking app with Markdown editing, tag organization, and full-text search.
The first two lines should make it instantly clear: what is this, and what does it do?
Screenshots
A picture is worth a thousand words. Include a screenshot of the project's core page:

If you have multiple screenshots, use a GIF to show interactive flows.
Tech Stack
List the main technologies so people can quickly assess whether it uses what they need:
## 🛠️ Tech Stack
| Category | Technology |
|------|------|
| Framework | Next.js 14 |
| Language | TypeScript |
| Styling | Tailwind CSS |
| Database | Supabase |
| Authentication | NextAuth.js |
| Deployment | Vercel |
Installation Steps
The more detailed, the better. Assume the reader knows nothing:
## 📦 Installation
1. Make sure you have Node.js installed (version 18 or higher)
- Check your version: `node --version`
- Download: https://nodejs.org/
2. Clone the project
```bash
git clone https://github.com/xxx/xxx.git
cd xxx
-
Install dependencies
npm install -
Configure environment variables
cp .env.example .env.localThen edit
.env.localand fill in:NEXT_PUBLIC_SUPABASE_URL=your-supabase-urlNEXT_PUBLIC_SUPABASE_ANON_KEY=your-supabase-anon-key -
Start the project
npm run dev -
Open your browser and visit http://localhost:3000
## A Real Example of a Good README
Look at what high-star projects on GitHub do well:
- **shadcn/ui**: Clear installation commands, rich component screenshot examples
- **Next.js**: Concise feature list, comprehensive documentation links
- **Cal.com**: Detailed deployment guide, clear architecture diagrams
Common traits:
1. A one-line explanation of what it is right at the top
2. Screenshots or GIFs included
3. Foolproof installation steps
4. Clear, well-organized structure
## CHANGELOG Basics
A CHANGELOG records the project's version history:
```markdown
# Changelog
## [1.2.0] - 2024-03-15
### Added
- Dark mode toggle
- Markdown export support
### Fixed
- Login page styling issue on Safari
- Chinese word segmentation in search
### Changed
- Upgraded Next.js to 14.1
## [1.1.0] - 2024-02-01
### Added
- Tag categorization
- Full-text search
### Fixed
- Mobile layout issues
## [1.0.0] - 2024-01-15
### Added
- Initial release
- Basic note-taking functionality
- User authentication
Auto-Generate with Conventional Commits
If your commit messages follow conventions, you can auto-generate the CHANGELOG:
# Install conventional-changelog
npm install -g conventional-changelog-cli
# Generate CHANGELOG
conventional-changelog -p angular -i CHANGELOG.md -s
Using AI to Generate Documentation
AI can help you quickly generate documentation drafts:
Let AI Generate a README
In Cursor, you can:
Prompt: Based on this project's code structure and features, generate a complete README.md.
Include project introduction, tech stack, installation steps, and usage instructions.
Let AI Generate Function Documentation
// Type /** above a function and press Enter — Cursor auto-generates JSDoc comments
/**
* Calculate the total price of all items in the shopping cart
* @param items - List of items in the cart
* @param discount - Discount rate (decimal between 0-1)
* @returns The discounted total price (in cents)
* @example
* const total = calculateTotal([{ price: 1000, quantity: 2 }], 0.1);
* // Returns 1800
*/
function calculateTotal(items: CartItem[], discount: number): number {
const subtotal = items.reduce((sum, item) => sum + item.price * item.quantity, 0);
return Math.round(subtotal * (1 - discount));
}
JSDoc / TypeDoc Basics
JSDoc is the documentation comment standard for JavaScript/TypeScript:
Basic Syntax
/**
* User login
*
* @param email - User's email address
* @param password - User's password
* @returns Returns user info or null
* @throws Throws an error when the network request fails
*
* @example
* const user = await login('test@example.com', 'password123');
* if (user) {
* console.log('Login successful', user.name);
* }
*/
async function login(email: string, password: string): Promise<User | null> {
// ...
}
Common Tags
| Tag | Purpose | Example |
|---|---|---|
@param | Parameter description | @param name - User's name |
@returns | Return value description | @returns User object |
@throws | Thrown exceptions | @throws Network error |
@example | Usage example | @example fn('test') |
@deprecated | Deprecated | @deprecated Use newFn instead |
@see | Related reference | @see User class |
Generate a Documentation Site with TypeDoc
# Install
npm install -D typedoc
# Generate docs
npx typedoc --out docs src
# Generates HTML docs in the docs/ directory
Architecture Decision Records (ADR)
ADRs record important technical decisions in your project, including why each choice was made.
ADR Template
# ADR-001: Choosing Supabase as the Backend
## Status
Accepted
## Context
The project needs user authentication, a database, and file storage. The team consists of frontend developers unfamiliar with backend operations.
## Decision
Use Supabase as the backend service.
## Rationale
- Out-of-the-box authentication system
- PostgreSQL database — powerful and feature-rich
- Free tier sufficient for the MVP phase
- Frontend-friendly JavaScript SDK
- No need to manage servers ourselves
## Alternatives Considered
- Firebase: Google ecosystem, but NoSQL has more limitations
- Custom backend: flexible but high development cost
- Clerk + PlanetScale: fragmented, complex integration
## Consequences
- Benefits: Fast development speed, low operational overhead
- Risks: Vendor lock-in, costs after free tier is exhausted
Organizing ADR Files
docs/
└── adr/
├── 001-use-supabase.md
├── 002-use-tailwind.md
├── 003-use-app-router.md
└── README.md # ADR index
ADRs help future you and your team members understand: Why did we choose this technology? What alternatives did we consider?
Other Documentation
CONTRIBUTING.md
Tell others how to participate in your project:
# Contributing Guide
## How to Contribute
1. Fork this repository
2. Create a feature branch: `git checkout -b feature/xxx`
3. Commit your code: `git commit -m 'feat: add xxx'`
4. Push the branch: `git push origin feature/xxx`
5. Create a Pull Request
## Development Standards
- Use TypeScript
- Follow ESLint rules
- Commit messages follow Conventional Commits
## Reporting Bugs
Use the Issue template and provide:
- Problem description
- Steps to reproduce
- Expected behavior
- Screenshots (if applicable)
LICENSE
Choose an open-source license:
| License | Characteristics | Best For |
|---|---|---|
| MIT | Permissive, use freely | Most projects |
| Apache 2.0 | Permissive + patent protection | Commercial projects |
| GPL | Derivative works must be open-source | Open-source community projects |
Not sure which to pick? Use MIT.
You can select a license directly when creating a repository on GitHub, or visit choosealicense.com to choose.
Summary
- README is the project's business card — first impressions determine everything
- Installation steps should be foolproof — assume the reader knows nothing
- Screenshots/GIFs are essential — a picture is worth a thousand words
- CHANGELOG records version history — let users know what's been updated
- JSDoc documents your functions — facilitates maintenance and doc generation
- ADRs record technical decisions — future you will thank present you
- AI can help generate docs — but always review manually
Good documentation isn't a nice-to-have — it's a basic project requirement. Spending 30 minutes writing a good README could save you dozens of hours answering questions.