WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Commit b1ec6f1

Browse files
authored
Merge pull request #38 from CookethOrg/rewrite
Changes
2 parents d479dc7 + e5540bd commit b1ec6f1

35 files changed

+525
-324
lines changed

CODE_OF_CONDUCT.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Code of Conduct
2+
3+
## Our Commitment
4+
At Cooketh Flow, we are committed to fostering an inclusive, welcoming, and respectful community for all contributors, users, and participants. We expect everyone engaging with the project to uphold these values to create a positive environment.
5+
6+
## Who This Applies To
7+
This Code of Conduct applies to all community members, including but not limited to:
8+
- Project maintainers
9+
- Contributors
10+
- Users
11+
- Community members in discussions, events, and online spaces
12+
13+
## Expected Behavior
14+
To ensure a respectful and inclusive environment, we expect all participants to:
15+
- *Be Respectful*: Treat others with kindness, professionalism, and empathy.
16+
- *Be Inclusive*: Welcome and respect people of all backgrounds and identities.
17+
- *Collaborate Openly*: Engage in constructive discussions and offer helpful feedback.
18+
- *Respect Differences*: Understand that people have diverse opinions and experiences.
19+
- *Give Credit*: Properly attribute contributions and ideas.
20+
21+
## Unacceptable Behavior
22+
The following behaviors are considered unacceptable within our community:
23+
- Harassment, discrimination, or hate speech of any kind.
24+
- Personal attacks, insults, or derogatory comments.
25+
- Spamming, trolling, or intentionally disrupting discussions.
26+
- Publishing private or sensitive information without consent.
27+
- Any conduct that violates GitHub’s [Community Guidelines](https://docs.github.com/en/site-policy/github-terms/github-community-guidelines).
28+
29+
## Reporting Violations
30+
If you experience or witness any violation of this Code of Conduct, please report it by contacting the project maintainers at [contact email or GitHub issues]. All reports will be handled confidentially and reviewed promptly.
31+
32+
## Enforcement
33+
Violations of this Code of Conduct may result in:
34+
- A warning from project maintainers.
35+
- Temporary or permanent removal from the project or community spaces.
36+
- Reporting to relevant platforms or authorities if necessary.
37+
38+
## Acknowledgment
39+
This Code of Conduct is inspired by and adapted from the [Contributor Covenant](https://www.contributor-covenant.org/).
40+
41+
By participating in Cooketh Flow, you agree to abide by these guidelines and help create a positive and inclusive community.

CONTRIBUTING.md

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# CONTRIBUTING.md
2+
3+
# Contributing to Cooketh Flow
4+
5+
Thank you for your interest in contributing to **Cooketh Flow**! 🚀 We welcome contributions of all kinds, including code, documentation, bug reports, and feature suggestions.
6+
7+
## How to Contribute
8+
9+
1. **Fork the Repository**: Click the `Fork` button at the top of the repository page to create your own copy.
10+
2. **Clone Your Fork**: Clone the repository to your local machine:
11+
```sh
12+
git clone https://github.com/your-username/Cooketh-Flow.git
13+
cd Cooketh-Flow
14+
```
15+
3. **Create a Branch**: Create a new branch for your changes from the `rewrite` branch:
16+
```sh
17+
git checkout rewrite
18+
git checkout -b feature-branch
19+
```
20+
4. **Make Changes**: Implement your changes and ensure they follow the project's coding guidelines. **Do not touch or tamper with the `v0.1.0` branch**, as it is used for deployment.
21+
5. **Test Your Changes**: Run tests (if applicable) to verify that everything works correctly.
22+
6. **Commit Your Changes**: Commit with a clear message describing your changes:
23+
```sh
24+
git commit -m "Add feature XYZ"
25+
```
26+
7. **Push Your Changes**: Push your branch to your forked repository:
27+
```sh
28+
git push origin feature-branch
29+
```
30+
8. **Open a Pull Request**: Go to the original repository and open a Pull Request (PR) targeting the `rewrite` branch. **Ensure your PR is directed to the `rewrite` branch, not `v0.1.0`.**
31+
32+
## Code Guidelines
33+
34+
- Follow consistent formatting and linting rules.
35+
- Write clear and concise commit messages.
36+
- Document your code where necessary.
37+
- Ensure your changes do not break existing functionality.
38+
39+
## Reporting Issues
40+
41+
If you find a bug or have a feature request, please [open an issue](https://github.com/CookethOrg/Cooketh-Flow/issues) with a clear description and any relevant details.
42+
43+
## Community Guidelines
44+
45+
- Be respectful and inclusive.
46+
- Follow the [Code of Conduct](CODE_OF_CONDUCT.md).
47+
- Help others by reviewing and discussing pull requests.
48+
49+
## Governance
50+
[Cooketh Flow](https://github.com/CookethOrg/Cooketh-Flow) is led by [Subroto Banerjee](https://github.com/TeeWrath) as BDFL, who makes final decisions on the project’s direction. Contributors are encouraged to share ideas via GitHub Issues, but the BDFL reserves the right to guide the roadmap.
51+
52+
## License
53+
54+
By contributing, you agree that your contributions will be licensed under the same license as Cooketh Flow.
55+
56+
---
57+
We appreciate your contributions! ❤️ Happy coding!

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2025 Cooketh Org
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

lib/app.dart

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,10 @@ class MyApp extends StatelessWidget {
2424
debugShowCheckedModeBanner: false,
2525
routerConfig: AppRouteConfig.returnRouter(),
2626
localizationsDelegates: const [
27-
// GlobalMaterialLocalizations.delegate,
28-
// GlobalWidgetsLocalizations.delegate,
29-
// GlobalCupertinoLocalizations.delegate,
3027
FlutterQuillLocalizations.delegate, // REQUIRED for flutter_quill
3128
],
32-
// NEW: Define supported locales (at least English for now)
3329
supportedLocales: const [
34-
Locale('en', ''), // English
35-
// Add other locales your app supports if needed, e.g., Locale('es', '') for Spanish
30+
Locale('en', ''), // English for now
3631
],
3732
);
3833
},

lib/core/helpers/date_time_helper.dart

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,18 @@ class DateTimeHelper {
22
String formatLastEdited(DateTime? lastEdited) {
33
if (lastEdited == null) return "Edited Just Now";
44
final now = DateTime.now();
5-
final difference = now.difference(lastEdited);
5+
final difference = now.difference(lastEdited);
66

7-
if (difference.inDays > 0) {
8-
return 'Edited ${difference.inDays} day${difference.inDays == 1 ? '' : 's'} ago';
9-
} else if (difference.inHours > 0) {
10-
return 'Edited ${difference.inHours} hour${difference.inHours == 1 ? '' : 's'} ago';
11-
} else if (difference.inMinutes > 0) {
12-
return 'Edited ${difference.inMinutes} minute${difference.inMinutes == 1 ? '' : 's'} ago';
13-
} else {
14-
return 'Edited just now';
15-
}
7+
if (difference.inDays > 0) {
8+
return 'Edited ${difference.inDays} day${difference.inDays == 1 ? '' : 's'} ago';
9+
} else if (difference.inHours > 0) {
10+
return 'Edited ${difference.inHours} hour${difference.inHours == 1 ? '' : 's'} ago';
11+
} else if (difference.inMinutes > 0) {
12+
return 'Edited ${difference.inMinutes} minute${difference.inMinutes == 1 ? '' : 's'} ago';
13+
} else if (difference.inSeconds > 0) {
14+
return 'Edited ${difference.inSeconds} second${difference.inSeconds == 1 ? '' : 's'} ago';
15+
} else {
16+
return 'Edited just now';
17+
}
1618
}
1719
}

lib/core/helpers/input_validators.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ String? validatePassword(String? value) {
5454
return 'Password must contain at least one special character (., _, @, or #)';
5555
}
5656

57-
// Optional: Check for common weak passwords
57+
// Check for common weak passwords
5858
if (value.contains(RegExp(r'(123456|password|qwerty|abc123)'))) {
5959
return 'Password is too common or weak';
6060
}
@@ -72,7 +72,7 @@ String? validateEmail(String? value) {
7272
'Example: [email protected]';
7373
}
7474

75-
// Optional: Disallow disposable emails
75+
// Disallow disposable emails
7676
if (value.endsWith('@tempmail.com') ||
7777
value.endsWith('@mailinator.com')) {
7878
return 'Disposable email addresses are not allowed';

lib/core/helpers/responsive_layout.helper.dart

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1+
import 'package:cookethflow/core/utils/enums.dart';
12
import 'package:flutter/material.dart';
23

3-
enum DeviceType { mobile, tab, desktop }
4-
54
class ResponsiveLayoutHelper {
65
static const int mobileMaxWidth = 375;
76
static const int tabletMaxWidth = 720;

lib/core/utils/enums.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ import 'package:phosphor_flutter/phosphor_flutter.dart';
33

44
enum ProviderState { inital, empty, loading, loaded, success, error }
55

6+
enum DeviceType { mobile, tab, desktop }
7+
68
enum NodeType {
79
note,
810
rectangle,

lib/features/auth/pages/login.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import 'package:cookethflow/core/helpers/responsive_layout.helper.dart';
2+
import 'package:cookethflow/core/utils/enums.dart';
23
import 'package:cookethflow/features/auth/pages/desktop/login_desktop.dart';
34
import 'package:cookethflow/features/auth/pages/mobile/login_mobile.dart';
45
import 'package:cookethflow/features/auth/pages/tablet/login_tablet.dart';

lib/features/auth/pages/signup.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import 'package:cookethflow/core/helpers/responsive_layout.helper.dart';
2+
import 'package:cookethflow/core/utils/enums.dart';
23
import 'package:cookethflow/features/auth/pages/desktop/signup_desktop.dart';
34
import 'package:cookethflow/features/auth/pages/mobile/signup_mobile.dart';
45
import 'package:cookethflow/features/auth/pages/tablet/signup_tablet.dart';

0 commit comments

Comments
 (0)