diff --git a/README.md b/README.md index 83cc8d5..138be60 100644 --- a/README.md +++ b/README.md @@ -1,61 +1,129 @@ # DevHub -The official website for the DevHub developer community. Built with Next.js, TypeScript, and Tailwind CSS. +The official website for DevHub, a developer community focused on helping people learn, build, and connect with other developers. This repository contains the source code for the website, including the landing page, community rules, guides, resource library, articles, and partners page. + +If you're new here, welcome! This README is designed to guide you from cloning the repository to making your first contribution, even if you've never worked with this codebase before. + +## About DevHub + +DevHub is a developer community focused on helping programmers learn, collaborate, and grow together. + +The website brings together community resources in one place, including: + +- πŸ“š Learning guides for developers +- πŸ› οΈ Curated tools and useful resources +- πŸ“– Articles and tutorials +- 🀝 Community information and onboarding guides +- πŸ“œ Rules, FAQs, and moderation guides +- ❀️ Open-source contribution opportunities + +If you're new to open source, this project is a great place to start because documentation improvements, bug fixes, and feature enhancements are all welcome. ## What's in here -- Landing page -- Community guides -- Resource library, curated tools and learning materials -- Partners page -- DevHub Pages: - - Getting Started - - Join Guide - - Server Info - - How to Ask - - How to Help - - Code of Conduct - - Contributing - - Moderation Guide - - Staff Roles - - FAQ - - and many many more +- Landing page: introduction to DevHub and what the community offers +- Pages: guides like Getting Started, How to Ask, How to Help, Code of Conduct, Contributing, Moderation Guide, Staff Roles, FAQ, and more +- Resource library: curated tools and learning materials +- Articles: write-ups from the community +- Rules: the server and community rules in one place +- Partners: communities and projects DevHub partners with ## Tech Stack -- **Framework** - Next.js -- **Language** - TypeScript -- **Styling** - Tailwind CSS -- **Animation Libriary** - GSAP and Framer Motion -- **Component Libriary** - React Bits -- **Icons** - Lucide -- **Deployment** - Vercel +| Technology | Purpose | +| -------------------- | ----------------------------------------- | +| Next.js | React framework used to build the website | +| TypeScript | Adds static typing to JavaScript | +| Tailwind CSS | Utility-first CSS framework for styling | +| GSAP & Framer Motion | Animation libraries | +| React Bits | UI component library | +| Lucide | Icon library | +| Vercel | Deployment platform | + +You don't need to know all of these before contributing. Most changes only touch one or two of them at a time. ## Getting Started +Follow the steps below to run the project on your own computer. + +Don't worry if you've never worked with a Next.js project beforeβ€”each step is explained. + ### Prerequisites -- Node.js 18+ -- bun, npm, yarn, or pnpm +Before you begin, make sure you have the following installed: + +- **Node.js 18 or later** +- A package manager such as **npm**, **bun**, **pnpm**, or **yarn** +- **Git** + +> **Note:** This guide uses **npm** for all examples. If you prefer **bun**, **pnpm**, or **yarn**, you can use the equivalent commands instead. -### Setup +You can verify your installation by running: + +```bash +node -v +npm -v +git --version +``` + +### Step 1: Clone the repository + +Clone the project from GitHub: + +```bash +git clone https://github.com/open-devhub/website.git +``` + +Move into the project directory: ```bash -# Clone the repo -git clone https://github.com/open-devhub/website cd website +``` + +### Step 2: Install dependencies -# Install dependencies +This project depends on several external packages. Install them using: + +```bash npm install +``` + +This may take a few minutes the first time. + +### Step 3: Start the development server + +Run: -# Start the dev server +```bash npm run dev ``` -Open [http://localhost:3000](http://localhost:3000) and you're in. +The development server will start locally. + +Open your browser and visit: + +``` +http://localhost:3000 +``` + +Whenever you save changes to the code, the browser automatically refreshes so you can instantly see your updates. + +### Step 4: Verify Everything Works + +Once the development server is running, open your browser and visit: + +``` +http://localhost:3000 +``` + +You should see the DevHub homepage. Try navigating to a few pages to make sure everything loads correctly. + +If you've made changes, save your files and verify that the browser updates automatically. ## Project Structure +Below is an overview of the repository structure to help you locate important files and folders. + ``` β”œβ”€β”€ πŸ“ .github β”‚ └── πŸ“ workflows @@ -140,52 +208,142 @@ Open [http://localhost:3000](http://localhost:3000) and you're in. β”‚ β”œβ”€β”€ πŸ“„ redirects.config.ts β”‚ β”œβ”€β”€ πŸ“„ staticdata.config.ts β”‚ └── πŸ“„ utils.ts -β”œβ”€β”€ πŸ“„ .eslintrc.json -β”œβ”€β”€ πŸ“„ .gitignore -β”œβ”€β”€ πŸ“„ bun.lock -β”œβ”€β”€ πŸ“„ components.json -β”œβ”€β”€ πŸ“„ CONTRIBUTING.md -β”œβ”€β”€ πŸ“„ LICENSE -β”œβ”€β”€ πŸ“„ next.config.js -β”œβ”€β”€ πŸ“„ package-lock.json -β”œβ”€β”€ πŸ“„ package.json -β”œβ”€β”€ πŸ“„ postcss.config.js -β”œβ”€β”€ πŸ“„ README.md -β”œβ”€β”€ πŸ“„ tailwind.config.ts -β”œβ”€β”€ πŸ“„ tsconfig.json -β”œβ”€β”€ πŸ“„ vercel.json +β”œβ”€β”€ app/ β†’ Pages of the site (Next.js App Router) +β”‚ β”œβ”€β”€ api/ β†’ API routes (e.g. link previews) +β”‚ β”œβ”€β”€ pages/ β†’ Renders the guide pages (Getting Started, FAQ, etc.) +β”‚ β”œβ”€β”€ articles/ β†’ Article listing + individual article pages +β”‚ β”œβ”€β”€ partners/ β†’ Partners page +β”‚ β”œβ”€β”€ resources/ β†’ Resource library page +β”‚ └── rules/ β†’ Community rules page +β”œβ”€β”€ components/ β†’ Reusable React components +β”‚ β”œβ”€β”€ home/ β†’ Landing page sections (Hero, Features, Stats, etc.) +β”‚ β”œβ”€β”€ site/ β†’ Shared layout pieces (Navbar, Footer, Section) +β”‚ β”œβ”€β”€ ui/ β†’ Generic building blocks (buttons, dialogs, badges…) +β”‚ └── bits/ β†’ Visual/animation effects (glow, fuzzy text, cursor) +β”œβ”€β”€ content/ β†’ Site copy and structured data +β”‚ β”œβ”€β”€ pages/ β†’ Content for the guide pages +β”‚ β”œβ”€β”€ articles/ β†’ Article content +β”‚ β”œβ”€β”€ resources.ts β†’ Resource library data +β”‚ └── rules.ts β†’ Community rules data +β”œβ”€β”€ lib/ β†’ Shared utility code +β”‚ β”œβ”€β”€ markdown/ β†’ Markdown parser used for articles/pages +β”‚ β”œβ”€β”€ animations.ts β†’ Shared animation configs +β”‚ β”œβ”€β”€ colors.ts β†’ Color system used across the site +β”‚ └── utils.ts β†’ General helper functions +└── hooks/ β†’ Custom React hooks ``` ## Contributing -We welcome contributions of all kinds: bug fixes, new features, documentation improvements, and design feedback. +We welcome contributions from developers of all experience levels, including first-time contributors! + +A typical contribution workflow looks like this: + +1. Fork this repository to your GitHub account. +2. Clone your fork locally. +3. Create a new branch. -See [CONTRIBUTING.md](./CONTRIBUTING.md) for the full guide. The short version: +```bash +git checkout -b feature/my-new-feature +``` + +4. Make your changes. +5. Test your changes locally. +6. Run the linter: + +```bash +npm run lint +``` + +7. Commit your changes. + +```bash +git commit -m "feat: add awesome feature" +``` + +8. Push your branch. + +```bash +git push origin feature/my-new-feature +``` + +9. Open a Pull Request describing what you changed and why. + +New to open source? Look for issues tagged [`good first issue`](https://github.com/open-devhub/website/issues?q=is%3Aopen+label%3A%22good+first+issue%22). These are picked specifically to be approachable for first-time contributors. + +For a more detailed contribution guide, coding standards, and pull request expectations, please see [CONTRIBUTING.md](./CONTRIBUTING.md). + +## Useful Scripts + +| Command | Description | +| ------------------- | -------------------------------------- | +| `npm run dev` | Starts the local development server. | +| `npm run build` | Creates an optimized production build. | +| `npm run start` | Runs the production build locally. | +| `npm run lint` | Checks your code for linting issues. | +| `npm run typecheck` | Check for type errors. | +| `npm run format` | Formats the project using Prettier. | + +## Testing Your Changes + +Before opening a Pull Request, make sure your changes work as expected. + +Run the linter: -1. Fork the repo -2. Create a branch (`git checkout -b feature/your-cool-feature`) -3. Make your changes -4. Run `npm run lint` -5. Open a PR with a clear description +```bash +npm run lint +``` + +Then start the development server: + +```bash +npm run dev +``` + +Open the website in your browser and verify that your changes appear correctly and don't introduce any issues. + +If the project adds automated tests in the future, be sure to run those as well before submitting your contribution. + +## Troubleshooting + +### `npm install` fails -First time contributing to open source? Look for issues tagged [`good first issue`](https://github.com/open-devhub/website/issues?q=is%3Aopen+label%3A%22good+first+issue%22). +Make sure you're using **Node.js 18 or later**. -## Scripts +### Port 3000 is already in use + +Run the development server on another port: ```bash -npm run dev # Start development server -npm run build # Production build -npm run start # Start production server -npm run lint # Run ESLint -npm run format # Run Prettier +npm run dev -- -p 3001 +``` + +### Module not found + +Delete the `node_modules` folder and reinstall dependencies: + +```bash +rm -rf node_modules +npm install ``` ## Community -- **Discord** - [devhub.vercel.app/join](https://devhub.vercel.app/join) -- **GitHub Org** - [github.com/open-devhub](https://github.com/open-devhub) -- **Email** - open-devhub@outlook.com +Want to get involved? We'd love to have you! + +- **Website:** [devhub.vercel.app](https://devhub.vercel.app) +- **Discord:** [Join DevHub](https://devhub.vercel.app/join) – Ask questions, connect with other developers, and stay up to date with the community. +- **GitHub:** [open-devhub](https://github.com/open-devhub) – Explore our projects and contribute. +- **Email:** open-devhub@outlook.com – Reach out for general inquiries or support. ## License Licensed under the GNU GPL v3.0 License. See the [LICENSE](./LICENSE) file for details. + +## Contributors + +Thanks to everyone who has contributed to this repository. + + + +