Skip to content

Latest commit

 

History

History
144 lines (91 loc) · 6.56 KB

File metadata and controls

144 lines (91 loc) · 6.56 KB

Contribution Guide

📑 Table of Contents

📦 Prerequisites

Make sure you have the following tools installed before setting up the project:

  • Git: Distributed version control system
  • Node.js: Runtime environment for JavaScript
  • pnpm: Package Manager for Node.js projects

Recommendation

For easier Node.js management, consider using nvm, which allows you to quickly obtain and use different versions of Node.js via the command line.

🚀 Getting started

Follow these steps to set up the project:

1. Clone the repository locally

git clone [email protected]:codingones/conference-website.git

2. Install project dependencies

cd conference-website
pnpm install

After completing these steps, you're ready to start working on the project. Happy coding! 🎉

🛠️ Available Scripts

These commands are essential for application development:

pnpm start

Runs the app in development mode.
Open http://localhost:3000 to view it in the browser.

The page will automatically reload if you make edits.
You will also see any lint errors in the console.

pnpm test

Launches Vitest test runner.

Tests will automatically rerun if you make edits.

pnpm build

Builds the app for production in the build folder.
It optimizes the build, correctly bundling React in production mode.

The build is minified, and the filenames include hashes.
Your app is ready for deployment!

pnpm lint.es

Performs static analysis of the project's source in the src/ folder.

pnpm lint.style

Performs static analysis of the project's style sheets in the src/ folder.

pnpm lint.commit

Checks the syntax of all commits made since the last common commit with the main branch.

pnpm prettier

Fixes the syntax of all project files.

pnpm lint.staged

Runs all static analysis on files staged with git.

🤝 Requirements

Branches

  • Keep Branches Up-to-Date: Branches should be kept up-to-date with the main branch using a rebased, linear history
  • Use Conventional Prefixes: When creating new branches, ensure they are prefixed with one of the following categories: build/, chore/, ci/, docs/, feat/, fix/, perf/, refactor/, revert/, style/ or test/, depending on the nature of the changes. Refer to the Conventional Commits cheat sheet to learn more about these categories

Commits

  • Follow Conventional Commits: Commit messages must adhere to the Conventional Commits specification. Please follow these guidelines for writing valid commit messages
  • Signed Commits: Ensure that commits are signed using a GPG key. Refer to About commit signature verification for more information on setting it up

Feature branch workflow

  1. Create Your Feature Branch: Use git checkout -b feat/amazing-feature to create a new branch for your changes
  2. Commit Your Changes: Make your changes and commit them with a descriptive message. For example, git commit -m "feat: add some amazing feature"
  3. Push to the Branch: Push your feature branch to the remote repository with git push origin feat/amazing-feature
  4. Open a Pull Request: Once your changes are pushed, open a Pull Request against the main branch. Provide details about the changes and request a review from collaborators.

🏗️ Built with

Langages & Frameworks

  • TypeScript: the main programming language used here, it is an open-source language that builds on JavaScript by adding static typing
  • React: a declarative and efficient JavaScript library for building interactive user interfaces
  • Next.js: a React Framework for building full-stack web applications.

Tools

  • Vitest: blazing-fast Unit Test Framework
  • Eslint: static code analyzer for JavaScript and TypeScript
  • StyleLint: static style sheet analyzer
  • Prettier: code formatter for various languages and syntaxes
  • Husky: performs automatic checks before publishing contributions with git
  • Commitlint: ensures commit messages follow the Conventional Commits specification
  • Lint-staged: applies all linters against staged git files

Continuous Integration

  • GitHub Actions: GitHub's built-in integration and continuous deployment tool
  • Variables for github-pages environment:
    • NEXT_PUBLIC_BASE_PATH: /conference-website, used in NextConfig at build time to define app basePath configuration
    • NEXT_PUBLIC_ASSET_PREFIX: /conference-website, used in NextConfig at build time to define app assetPrefix configuration
  • Workflows:
    • Validate feature branch: Runs on every branch starting with a conventional prefix. It checks code quality before merging into the main branch
    • Publish on GitHub Pages: Runs on every merge into the main branch. It builds and publishes a static website to GitHub Pages
      • Uses github-pages environment, created automatically by setting up the GitHub Action source from the Build and deployment section in Settings/Pages

Continuous Deployment

🏷️ Versioning

This project follows Semantic Versioning 2.0.0 specification for version naming, ensuring a clear release cycle and promoting backward compatibility.