Thanks for your interest in contributing to tweakcn.com! We're excited to have you here.
Please take a moment to review this document before submitting your first pull request. We also strongly recommend checking open Issues and Pull Requests to see if someone else is working on something similar.
If you need any help or want to discuss ideas, feel free to join our community on Discord.
tweakcn.com is a powerful Visual Theme Editor designed for Tailwind CSS & shadcn/ui components. Websites built with shadcn/ui often share a similar look; tweakcn helps you visually customize these components to make your projects stand out.
This repository contains the Next.js application for tweakcn.com. Here's a simplified overview of the project's directory structure:
├── actions/ # Next.js Server Actions
├── app/
├── (auth)/ # Authentication routes
├── (legal)/ # Legal pages (privacy policy)
├── api/ # Public API endpoints
├── dashboard/ # User dashboard (saved themes)
├── editor/ # Main theme editor route
├── layout.tsx # Root application layout
└── page.tsx # Landing page route
├── components/
├── editor/ # Theme editor interface components
├── examples/ # Demo components for theme previews
├── home/ # Landing page components
└── ui/ # Base shadcn/ui components
├── config/ # App configuration & default values
├── db/ # Database schema & logic (Drizzle ORM)
├── hooks/ # Custom React hooks
├── lib/ # 3rd-party library integrations & helpers
├── public/
└── r/ # Holds JSON files for the theme registry
├── scripts/ # Utility scripts used during development
├── store/ # Global state management (Zustand)
└── utils/ # General utility functions and helpers
Even if you don't plan to write code, there are many ways to contribute:
- Create an Issue: If you find a bug, have an idea for a new feature, or want to suggest an improvement, please create an issue on GitHub. This helps us track and prioritize feedback.
- Spread the Word: If you like tweakcn.com, please share it with your friends, colleagues, and on social media. Helping grow the community makes the tool better for everyone.
- Use tweakcn.com: The best feedback comes from real-world usage! As you use the editor, if you encounter any issues or have ideas for improvement, please let us know by creating an issue or reaching out on Discord.
- Node.js 18+
- npm / yarn / pnpm
-
Fork the Repository: Start by creating your own copy of the tweakcn repository on GitHub. Click the "Fork" button in the top-right corner.
-
Clone Your Fork: Clone the repository you just forked to your local machine:
git clone https://github.com/YOUR_USERNAME/tweakcn.git cd tweakcnReplace
YOUR_USERNAMEwith your actual GitHub username. -
Install Dependencies: Install the necessary project dependencies:
npm install
-
Configure Environment Variables:
cp .env.example .env.local # Copy the example environment file- Open the
.env.localfile and replace the placeholder values with your actual credentials obtained from the services.
- Open the
-
Apply Database Schema: Push the database schema defined in
db/schema.tsto your Neon database using Drizzle Kit:npx drizzle-kit push
- (Optional) You can view your database structure using Drizzle Studio by running
npx drizzle-kit studio.
- (Optional) You can view your database structure using Drizzle Studio by running
-
Create a New Branch: Before making changes, create a dedicated branch for your feature or bug fix:
git checkout -b your-descriptive-branch-name
(e.g.,
feature/add-community-gallery,fix/login-button-style) -
Start the Development Server:
npm run dev
-
Open http://localhost:3000 in your browser.
You're now ready to start coding!
If you encounter unexpected issues, especially after pulling new changes or related to database/auth setup, try resetting your local environment:
-
Stop the development server (Ctrl+C).
-
Delete the
node_modulesand.nextdirectories:# On macOS / Linux: rm -rf node_modules .next # On Windows (PowerShell): Remove-Item -Recurse -Force node_modules, .next
-
Reinstall dependencies:
npm install
-
Re-run the database push command (optional, but good practice if schema might have changed):
npx drizzle-kit push
-
Restart the development server:
npm run dev
Once you've made your changes and tested them locally, follow these steps to submit them for review:
-
Stage Your Changes: Add the files you've modified to the Git staging area.
git add . -
Commit Your Changes: Commit your staged changes with a descriptive message that follows the Conventional Commits specification. This helps automate releases and makes the commit history easier to understand.
git commit -m "feat(editor): Add contrast checker component"- Format:
type(scope): description(e.g.,fix(auth): Correct GitHub redirect URL,docs(readme): Update setup instructions). - Common Types:
feat(new feature),fix(bug fix),docs(documentation),style(code style),chore(build process, tooling). - Refer to the Conventional Commits specification for more details.
- Format:
-
Push to Your Fork: Push your committed changes to the branch on your forked repository on GitHub.
git push origin your-descriptive-branch-name
Replace
your-descriptive-branch-namewith the actual name of your branch. -
Open a Pull Request (PR):
- Go to the original tweakcn repository on GitHub.
- You should see a prompt suggesting you create a Pull Request from your recently pushed branch. Click on it. If not, navigate to the "Pull requests" tab and click "New pull request".
- Ensure the base repository is
jnsahaj/tweakcnand the base branch ismain(or the appropriate target branch). - Ensure the head repository is your fork and the compare branch is
your-descriptive-branch-name. - Write a Clear Description: Fill out the pull request template (if one exists). Provide a clear title and a detailed description of the changes you've made. Explain why you made the changes and link to any relevant GitHub Issues (e.g., "Closes #123").
-
Review Process:
- Once submitted, maintainers will review your pull request.
- Maintainers may provide feedback or request changes directly on the pull request. Please address these comments by pushing further commits to your branch.
- Once approved, a maintainer will merge your changes into the main project.
Thank you for contributing!