From 0824474e70db6f8ae3d779dbdca6d7351f999370 Mon Sep 17 00:00:00 2001 From: Daniel Samson Date: Fri, 30 Oct 2026 09:41:15 +0000 Subject: [PATCH] chore: initial project setup with documentation and standards --- .gitignore | 104 +++++++++++++++++ CONTRIBUTING.md | 259 +++++++++++++++++++++++++++++++++++++++++++ LICENSE | 86 +++----------- README.md | 112 ++++++++++++------- docs/api.md | 253 ++++++++++++++++++++++++++++++++++++++++++ docs/architecture.md | 95 ++++++++++++++++ 6 files changed, 803 insertions(+), 106 deletions(-) create mode 100644 .gitignore create mode 100644 CONTRIBUTING.md create mode 100644 docs/api.md create mode 100644 docs/architecture.md diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..7ac80fb --- /dev/null +++ b/.gitignore @@ -0,0 +1,104 @@ +# OS Files +.DS_Store +.DS_Store? +._* +.Spotlight-V100 +.Trashes +ehthumbs.db +Thumbs.db + +# Dependencies +node_modules/ +.pnp.* +yarn-error.log + +# Build outputs +dist/ +build/ +*.js +*.ts.map +*.bundle.js +.next/ +out/ +coverage/ + +# Environment files +.env +.env.local +.env.*.local +.env.development.local +.env.test.local +.env.production.local +.env.example # Only if you want to commit it (usually shouldn't) + +# Logs +logs/ +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +lerna-debug.log* +pnpm-debug.log* + +# Editor and IDE files +.idea/ +.vscode/ +*.sublime-project +*.sublime-workspace +*.swp +*.swo +*~ +.project +.classpath +.settings/ +.svn/ + +# Testing +.nyc_output/ +.jest.cache/ +.pnp.loader.mjs + +# Debugging +.debugger +.debug.* +.history/ + +# Misc +.cache/ +.temp/ +.tmp/ +.pid +*.pid.lock +*.seed +session_data/ + +# Temporary files +*.tmp +*.cache +*~ + +# Database files (if applicable) +*.sqlite +*.db +*.sql.backup + +# Local configuration +config.local.json +local.conf +settings.local.* + +# Package lock files (choose one - don't commit multiple) +yarn.lock # if using yarn instead of npm +package-lock.json # if not using yarn + +# Documentation generation (if used) +docs/_build/ +*.html.unchecked + +# Linting (if using tools that generate config) +.eslintcache + +# Secrets and tokens +.gitcredentials +.azure-devops.yml +.vscode/settings.json diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..83ebd81 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,259 @@ +# Contributing to newzy + +First off, thank you for considering contributing to **newzy**! It's people like you that make this project great. + +## Table of Contents + +- [Code of Conduct](#code-of-conduct) +- [Getting Started](#getting-started) +- [How to Contribute](#how-to-contribute) +- [Branch Strategy](#branch-strategy) +- [Git Workflow](#git-workflow) +- [Commit Message Guidelines](#commit-message-guidelines) +- [Pull Request Process](#pull-request-process) +- [Reporting Bugs](#reporting-bugs) +- [Adding Features](#adding-features) + +## Code of Conduct + +Please be respectful and constructive. We aim to maintain a welcoming environment for all contributors. + +## Getting Started + +### Prerequisites + +Before contributing, ensure you have: +- Node.js v18+ installed +- npm or yarn installed +- Git configured with your email and name: + ```bash + git config --global user.email "you@example.com" + git config --global user.name "Your Name" + ``` + +### Setup Development Environment + +```bash +git clone +cd newzy +npm install +cp .env.example .env +# Update .env with your configuration +npm run dev +``` + +## How to Contribute + +### 1. Find or Create an Issue + +- Check existing issues for similar problems/features +- If no issue exists, create one describing the problem/feature clearly +- Reference relevant documentation or examples if applicable + +### 2. Fork and Clone the Repository + +```bash +git clone https://github.com//newzy.git +cd newzy +git remote add upstream https://github.com//newzy.git +``` + +### 3. Create a Branch + +Follow our [branch strategy](#branch-strategy) below. + +### 4. Make Your Changes + +- Follow the existing code style +- Write tests for new features/bug fixes +- Update documentation as needed + +### 5. Test Locally + +Ensure your changes work correctly before submitting. + +### 6. Commit Your Changes + +Use [commit message guidelines](#commit-message-guidelines) below. + +### 7. Create a Pull Request + +Fill out the PR template, reference issues, and ensure all CI checks pass. + +## Branch Strategy + +Our repository uses a standard Git flow with the following branches: + +### `main` (Production) +- **Purpose**: Production-ready, stable releases only +- **Branch protection**: Enabled +- **Access**: Requires approval for merges +- **Content**: Merged, tested, and approved code + +### `develop` (Integration) +- **Purpose**: Integration branch for feature development +- **Branch protection**: Enabled with checks required +- **Access**: Open for contributors +- **Content**: Completed features ready for next release + +### Feature Branches (`feature/*`) +- **Pattern**: `feature/` or `feature/issue-number/` +- **Example**: `feature/42/article-search` or `feature/article-search` +- **Usage**: Create from `develop`, merge back to `develop` when complete + +### Bugfix Branches (`bugfix/*`) +- **Pattern**: `bugfix/` or `bugfix/issue-number/` +- **Example**: `bugfix/43/image-upload-crash` +- **Usage**: Create from `develop`, merge back to both `develop` and `main` if critical + +### Hotfix Branches (`hotfix/*`) +- **Pattern**: `hotfix/-` +- **Example**: `hotfix/50-critical-login-fix` +- **Usage**: Create from `main`, merge back to both `main` and `develop` + +## Git Workflow + +### Pre-push Hooks + +We use pre-push hooks to enforce code quality. These automatically: +- Run linting checks +- Build the project (if applicable) +- Ensure no sensitive files are committed + +To see hook output, run with verbose flags or check the `.github/hooks/pre-push.sh` script. + +### Merge Conflict Resolution Strategy + +1. **First responder owns**: The person who first modifies conflicting code takes responsibility +2. **Communicate early**: Notify team members immediately of conflicts +3. **Use git merge tools**: Visual diff tools help resolve conflicts cleanly +4. **Test thoroughly**: All merged code must pass tests +5. **Update documentation**: Document any workflow changes + +Recommended merge tool: [VSCode Merge Conflict Resolution](https://marketplace.visualstudio.com/items?itemName=rogalmi.bash-merge-tool) or [KDiff3](https://kdiff3.org/) + +## Commit Message Guidelines + +We follow the [Conventional Commits](https://www.conventionalcommits.org/) format: + +``` +(): + + + +