-
-
Notifications
You must be signed in to change notification settings - Fork 88
π docs: add CONTRIBUTING.md with setup guide and troubleshooting #248
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Satyanarayana001
wants to merge
7
commits into
AOSSIE-Org:main
Choose a base branch
from
Satyanarayana001:docs/contributing-clean
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
e4f5b8c
docs: add contributing guide only
Satyanarayana001 98254fe
Update CONTRIBUTING.md
Satyanarayana001 9901b94
Update CONTRIBUTING.md
Satyanarayana001 be7db2c
Update CONTRIBUTING.md with new content
Satyanarayana001 7bcc7e7
Update CONTRIBUTING.md
Satyanarayana001 4fb5fcc
Update CONTRIBUTING.md
Satyanarayana001 e543c37
Update CONTRIBUTING.md formatting and content
Satyanarayana001 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,213 @@ | ||
| # π€ Contributing to Ell-ena | ||
|
|
||
| Thank you for your interest in contributing to Ell-ena! This guide will help you get set up quickly and contribute effectively. | ||
|
|
||
| --- | ||
| ## Table of Contents | ||
|
|
||
| - [Quick Start](#-quick-start) | ||
| - [Prerequisites](#-prerequisites) | ||
| - [Setup Instructions](#-setup-instructions) | ||
| - [Project Structure](#-project-structure) | ||
| - [Development Workflow](#-development-workflow) | ||
| - [Code Style](#-code-style) | ||
| - [Reporting Issues](#-reporting-issues) | ||
| - [Pull Request Guidelines](#-pull-request-guidelines) | ||
| - [Common Issues & Fixes](#common-issues--fixes) | ||
| --- | ||
|
|
||
| ## β‘ Quick Start | ||
| ```bash | ||
| git clone https://github.com/AOSSIE-Org/Ell-ena.git | ||
| cd Ell-ena | ||
| flutter pub get | ||
| cp .env.example .env # then fill in your credentials | ||
| flutter run | ||
| ``` | ||
| > β οΈ If `.env.example` is missing, create `.env` manually using the variables below. | ||
| --- | ||
| ## π Prerequisites | ||
|
|
||
| Ensure the following are installed before you begin: | ||
|
|
||
| | Tool | Notes | | ||
| |------|-------| | ||
| | Flutter | Latest stable β run `flutter --version` to check | | ||
| | Dart | Bundled with Flutter | | ||
| | Git | Any recent version | | ||
| | IDE | Android Studio or VS Code (with Flutter extension) | | ||
| | Device | Emulator or physical device | | ||
|
|
||
| --- | ||
|
|
||
| ## π Setup Instructions | ||
|
|
||
| ### 1. Fork and Clone | ||
|
|
||
| Fork the repo on GitHub, then clone your fork: | ||
|
|
||
| ```bash | ||
| git clone https://github.com/<your-username>/Ell-ena.git | ||
| cd Ell-ena | ||
| ``` | ||
|
|
||
| ### 2. Install Dependencies | ||
|
|
||
| ```bash | ||
| flutter pub get | ||
| ``` | ||
|
|
||
| ### 3. Configure Environment | ||
|
|
||
| Copy the example env file and fill in your credentials: | ||
|
|
||
| ```bash | ||
| cp .env.example .env | ||
| ``` | ||
|
|
||
| ```env | ||
| SUPABASE_URL=your_supabase_url | ||
| SUPABASE_ANON_KEY=your_supabase_anon_key | ||
| ``` | ||
|
|
||
| > β οΈ Use your own Supabase project credentials. | ||
| > π« Never commit `.env` β it is already listed in `.gitignore`. | ||
|
|
||
| ### 4. Run the App | ||
|
|
||
| ```bash | ||
| flutter run | ||
| ``` | ||
|
|
||
| --- | ||
|
|
||
| ## π Project Structure | ||
| ```text | ||
| Ell-ena/ | ||
| βββ lib/ | ||
| β βββ main.dart # Entry point | ||
| β βββ screens/ # UI screens | ||
| β βββ widgets/ # Reusable widgets | ||
| β βββ services/ # Supabase & API logic | ||
| β βββ models/ # Data models | ||
| βββ test/ # Unit & widget tests | ||
| βββ .env.example # Environment variable template | ||
| βββ pubspec.yaml # Dependencies | ||
| ``` | ||
|
|
||
| > Adjust this structure to match the actual project layout if it differs. | ||
|
|
||
| --- | ||
|
|
||
| ## π Development Workflow | ||
|
|
||
| 1. Sync your fork with the upstream `main` branch before starting: | ||
| ```bash | ||
| git remote add upstream https://github.com/AOSSIE-Org/Ell-ena.git | ||
| git fetch upstream | ||
| git checkout main && git merge upstream/main | ||
| ``` | ||
| 2. Create a focused branch for your change: | ||
| ```bash | ||
| git checkout -b feature/your-feature-name | ||
| # or | ||
| git checkout -b fix/your-bug-name | ||
| ``` | ||
| 3. Make your changes, keeping commits small and descriptive. | ||
| 4. Push and open a Pull Request. | ||
|
|
||
| --- | ||
|
|
||
| ## π§ͺ Code Style | ||
|
|
||
| Run both commands before every commit: | ||
|
|
||
| ```bash | ||
| flutter analyze # catch errors & lint warnings | ||
| flutter format . # auto-format all Dart files | ||
| ``` | ||
|
|
||
| **Additional conventions:** | ||
|
|
||
| - Follow the [Effective Dart](https://dart.dev/guides/language/effective-dart) guidelines. | ||
| - Keep widgets small and composable. | ||
| - Add comments for non-obvious logic. | ||
| - Always guard async calls with `mounted` checks: | ||
| ```dart | ||
| if (!mounted) return; | ||
| ``` | ||
|
|
||
| --- | ||
|
|
||
| ## π Reporting Issues | ||
|
|
||
| Before opening an issue: | ||
|
|
||
| - Search [existing issues](https://github.com/AOSSIE-Org/Ell-ena/issues) to avoid duplicates. | ||
| - Try reproducing on the latest `main` branch. | ||
|
|
||
| When filing a bug report, include: | ||
|
|
||
| - Flutter version (`flutter --version`) | ||
| - Steps to reproduce | ||
| - Expected vs. actual behavior | ||
| - Screenshots or logs if relevant | ||
|
|
||
| Use the `bug` label for bugs and `enhancement` for feature requests. | ||
|
|
||
| --- | ||
|
|
||
| ## π¬ Pull Request Guidelines | ||
|
|
||
| - **One concern per PR** β keep it focused. | ||
| - **Link the related issue** in the PR description (e.g., `Closes #42`). | ||
| - **Pass CI** β ensure `flutter analyze` and `flutter format .` produce no errors. | ||
| - **Write a clear description** β what changed and why. | ||
| - **Be responsive** β address review feedback promptly. | ||
|
|
||
| PR title format: | ||
|
|
||
| ``` | ||
| feat: add dark mode toggle | ||
| fix: resolve login crash on Android 12 | ||
| docs: update setup instructions | ||
| ``` | ||
|
|
||
| --- | ||
|
|
||
| ## β οΈ Common Issues & Fixes | ||
|
|
||
| ### App not compiling | ||
|
|
||
| ```bash | ||
| flutter clean | ||
| flutter pub get | ||
| ``` | ||
|
|
||
| ### Missing `.env` file | ||
|
|
||
| Make sure `.env` exists in the root directory with valid values. See [Setup Instructions](#3-configure-environment). | ||
|
|
||
| ### Flutter version mismatch | ||
|
|
||
| ```bash | ||
| flutter upgrade | ||
| ``` | ||
|
|
||
| ### Supabase errors | ||
|
|
||
| - Verify `.env` values match your Supabase project dashboard. | ||
| - Ensure your Supabase project is not paused (free tier pauses after inactivity). | ||
|
|
||
| ### Async context warnings | ||
|
|
||
| ```dart | ||
| if (!mounted) return; | ||
| ``` | ||
|
|
||
| --- | ||
|
|
||
| ## π Thank You | ||
|
|
||
| Every contribution β bug reports, docs, code, or feedback β makes Ell-ena better. | ||
| If you have questions, open a [GitHub Discussion](https://github.com/AOSSIE-Org/Ell-ena/discussions) or comment on the relevant issue. | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.