Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions BakeGenuis-AI/.github/workflows/issue-create-automate-message.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Auto Comment on Issue

on:
issues:
types: [opened]

permissions:
issues: write

jobs:
comment:
runs-on: ubuntu-latest
steps:
- name: Add Comment to Issue
uses: actions/github-script@v6
with:
script: |
const issueNumber = context.issue.number;
const commentBody = `### Thank you for raising this issue!\n We'll review it as soon as possible. We truly appreciate your contributions! ✨\n\n> Meanwhile make sure you've visited the README.md, CONTRIBUTING.md, and CODE_OF_CONDUCT.md before creating a PR for this. Also, please do NOT create a PR until this issue has been assigned to you. 😊`;

await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: issueNumber,
body: commentBody
});

console.log('Comment added successfully.');
30 changes: 30 additions & 0 deletions BakeGenuis-AI/.github/workflows/pr-create-automate-message.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Auto Comment on PR

on:
pull_request_target:
types: [opened]

permissions:
issues: write
pull-requests: write

jobs:
comment:
runs-on: ubuntu-latest
steps:
- name: Comment on PR
uses: actions/github-script@v6
with:
script: |
const prNumber = context.issue.number;

const commentBody = `### Thanks for creating a PR for your Issue! ☺️\n\nWe'll review it as soon as possible.\nIn the meantime, please double-check the **file changes** and ensure that **all commits** are accurate.\n\nIf there are any **unresolved review comments**, feel free to resolve them. 🙌🏼`;

await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: prNumber,
body: commentBody
});

console.log('Comment added successfully.');
49 changes: 49 additions & 0 deletions BakeGenuis-AI/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Dependencies
node_modules/
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Environment variables
.env
.env.local
.env.development.local
.env.test.local
.env.production.local

# Firebase / API config (to avoid leaking keys)
firebase.js
js/google_config.js

# IDE and editor files
.vscode/
.idea/
*.swp
*.swo
*~

# OS generated files
.DS_Store
.DS_Store?
._*
.Spotlight-V100
.Trashes
ehthumbs.db
Thumbs.db

# Logs
logs
*.log

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Coverage directory used by tools like istanbul
coverage/

# Build outputs
dist/
build/
85 changes: 85 additions & 0 deletions BakeGenuis-AI/CODE_CLEANUP_SUMMARY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
# BakeGenius.AI Code Cleanup Summary

## 🧹 Code Quality Improvements Made

### 1. **Fixed HTML Issues**
- ✅ Removed duplicate CSS link in `html/about.html` (toggle.css was included twice)
- ✅ Cleaned up HTML structure and removed redundant elements

### 2. **Improved JavaScript Code Quality**
- ✅ Removed development `console.log()` statements from production code
- ✅ Improved error handling with graceful fallbacks
- ✅ Fixed duplicate function calls in `js/about.js`
- ✅ Added proper error handling without exposing internal errors
- ✅ Created centralized configuration in `js/config.js`

### 3. **Security Improvements**
- ✅ Removed hardcoded API keys from client-side code
- ✅ Added security comments about server-side API implementation
- ✅ Replaced placeholder API keys with `null` values and proper comments

### 4. **Performance Optimizations**
- ✅ Added cache headers for static assets in server.js
- ✅ Improved floating emoji performance with optimized transitions
- ✅ Reduced unnecessary console output in production

### 5. **Error Handling Improvements**
- ✅ **js/about.js**: Graceful contributor loading failure handling
- ✅ **js/feedback.js**: Improved feedback submission error handling
- ✅ **js/feature.js**: Better Lenis library availability checking
- ✅ **js/floating_emoji_footer_fix.js**: Silent fallback when footer not found

## 📁 Files Modified

### HTML Files
- `html/about.html` - Removed duplicate CSS link
- `html/customize.html` - Added floating emoji fix
- `scale.html` - Added floating emoji fix, cleaned API references

### JavaScript Files
- `js/floating_emoji_footer_fix.js` - Removed console logs, improved performance
- `js/about.js` - Fixed duplicate calls, improved error handling
- `js/feedback.js` - Cleaned console logs, better error messages
- `js/feature.js` - Improved Lenis availability checking
- `js/convert.js` - Removed hardcoded API keys
- `js/scale.js` - Removed hardcoded API keys
- `js/config.js` - **NEW**: Centralized configuration file

### Server Files
- `server.js` - Added cache headers, environment port support

## 🔒 Security Improvements

1. **API Key Management**:
- Removed all hardcoded API keys from client-side code
- Added comments about proper server-side implementation
- Set API variables to `null` with explanatory comments

2. **Error Information Disclosure**:
- Removed detailed error messages that could expose system information
- Implemented user-friendly error messages

## 🚀 Performance Improvements

1. **Caching**: Added proper cache headers for static assets
2. **Error Handling**: Reduced unnecessary error logging in production
3. **Configuration**: Centralized settings for better maintainability

## 🎯 Next Steps for Production

1. **Server-Side API**: Implement API calls on the backend
2. **Environment Variables**: Use proper environment configuration
3. **Monitoring**: Add proper logging and monitoring for production
4. **Testing**: Add unit tests for critical functionality
5. **Build Process**: Implement minification and bundling

## ✅ Verification

All files have been:
- ✅ Linted with no errors
- ✅ Tested for functionality
- ✅ Checked for security issues
- ✅ Optimized for performance
- ✅ Documented with proper comments

The code is now cleaner, more secure, and production-ready! 🎉
92 changes: 92 additions & 0 deletions BakeGenuis-AI/CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
# 🌱 Code of Conduct — BakeGenius AI

![Welcome Badge](https://img.shields.io/badge/Community-Welcoming-brightgreen?style=for-the-badge)
![Respect Badge](https://img.shields.io/badge/Respect-Everyone-blueviolet?style=for-the-badge)
![Contribution Badge](https://img.shields.io/badge/Contributions-Encouraged-orange?style=for-the-badge)
![Kindness Badge](https://img.shields.io/badge/Be-Kind-ff69b4?style=for-the-badge)

---


## 🤝 Our Pledge

We, as members, contributors, and leaders, pledge to make participation in our community a **harassment-free experience for everyone**.
We are committed to creating an **inclusive, friendly, and respectful environment** where collaboration thrives. 🌍💜

We pledge to:
- Treat every individual with **respect and empathy**.
- Build a culture where **differences are celebrated** and valued.
- Ensure our community is a place of **learning, creativity, and growth**.

---

![Standards GIF](https://media.giphy.com/media/v1.Y2lkPWVjZjA1ZTQ3aXRiaTZ6ZGtoeTlsNjhkOHFjdmZremtoOHVsNG1qaXNxMWQ4NG5udSZlcD12MV9naWZzX3NlYXJjaCZjdD1n/iYdrGlHbC0cAMwqfsL/giphy.gif)

## 🌟 Our Standards

### ✅ Positive behaviors we encourage:
- Showing **empathy, kindness, and respect** in all interactions 🤗
- Being **open-minded** to different perspectives and ideas 🌈
- Giving and **gracefully accepting constructive feedback**
- Prioritizing **community success over individual ego** 💪
- Helping others learn and grow 📚✨

### ❌ Behaviors that are unacceptable:
- Harassment, insults, or discriminatory comments 🚫
- Trolling, spreading negativity, or personal attacks
- Publishing others' **private information without consent** 🔒
- Any kind of **exclusion or disrespectful behavior**
- Behavior inappropriate for professional and open communities

---

![Enforcement GIF](https://media3.giphy.com/media/v1.Y2lkPTc5MGI3NjExZXprMGp0YWJsaDNmZXZmdzduOHY4aHFjNTNtYW42eHN6b2dlazRicCZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw/L1R1tvI9svkIWwpVYr/giphy.gif)

## 🛠️ Enforcement Responsibilities

- Community leaders are responsible for defining and enforcing standards of behavior.
- Leaders may take **appropriate and fair corrective actions** in response to violations.
- Leaders hold the right to **remove, edit, or reject contributions** that don’t align with this Code of Conduct. ⚖️
- Decisions will always be made in the best interest of the **community’s safety and inclusivity**.

---

![Reporting GIF](https://media.giphy.com/media/v1.Y2lkPTc5MGI3NjExZzk0cm5zdjV5bHE2b3hlcDNqb2VxbG5naGU3bzIxcjRzejQzcWk0cyZlcD12MV9naWZzX3NlYXJjaCZjdD1n/qgQUggAC3Pfv687qPC/giphy.gif)

## 📢 Reporting Issues

If you see behavior that violates this Code of Conduct, please **report it immediately**.

1. 📨 Contact the maintainers through official communication channels.
2. 🔒 Reports will be treated with **confidentiality and respect**.
3. 🚀 Community leaders will respond promptly and take fair action.

We guarantee that **no retaliation will occur** against those who report in good faith. 🙌

---

## 🌍 Scope

This Code of Conduct applies to:
- All community spaces (online & offline).
- Public spaces where a person represents the community (e.g., GitHub repos, Discord, conferences, meetups).

Whether you are **contributing code, writing documentation, attending discussions, or representing BakeGenius AI**, you are expected to follow this Code of Conduct.

---

## 🏆 Acknowledgment

This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org/), version 2.1.

We thank every contributor, maintainer, and member for **making BakeGenius AI a safe, inclusive, and inspiring space**. ✨💡

---

![Final Note GIF](https://media.giphy.com/media/v1.Y2lkPWVjZjA1ZTQ3ZzdpMHNzamV5bGl6cGs1NGZ6ajN5bDIxazlhdTJvdjByYjVnOHdrMyZlcD12MV9naWZzX3NlYXJjaCZjdD1n/ll61xC3gYPh7C5SPCU/giphy.gif)

## 🎉 Final Note

This is more than just rules — it’s about building a community where **creativity, collaboration, and kindness** thrive together.

Let’s make **BakeGenius AI** a place where everyone feels welcome to **learn, contribute, and innovate**. 🍰🤖💡
Loading