Skip to content
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

[BUG-55]: Improve Contributions Docs #147

Open
wants to merge 9 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 5 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
79 changes: 78 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1 +1,78 @@
# Contributing
# Contributing Guidelines

Welcome to the contributing guidelines for the Planet Of The Bugs repository on GitHub! We appreciate your interest in contributing to our project. Whether you're an experienced developer or just starting out, we value your input and contributions.

## Table of Contents

- [Getting Started](#getting-started)
- [Forking the Repository](#forking-the-repository)
- [Setting Up Your Local Environment](#setting-up-your-local-environment)
- [Contributing](#contributing)
- [Creating a New Feature or Bugfix](#creating-a-new-feature-or-bugfix)
- [Making Changes](#making-changes)
- [Submitting a Pull Request](#submitting-a-pull-request)
- [Code of Conduct](#code-of-conduct)

## Getting Started

Thank you for considering contributing to our project. Before you begin, please make sure you have a GitHub account. If you don't have one, you can sign up [here](https://github.com/signup).

### Setting Up Your Local Environment

1. Clone the repository to your local machine: git clone https://github.com/Emmanuel-Melon/planet-of-the-bugs.git
2. Navigate to the main branch:
```git checkout dev```
3. Navigate to the client app:
```cd apps/client```
4. To get started, copy the .example.env file to .env by running the following command in your terminal:
```cp .example.env .env```
5. Install any necessary dependencies:
```yarn && yarn dev```
6. Start the development server by running the following command in your terminal: Navigate to [http://localhost:3000](http://localhost:3000) in your web browser to view the app.
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It'd be localhost:5173 in this case.



## Contributing

We welcome contributions from developers of all skill levels. Whether you're fixing a bug, adding a new feature, or improving documentation, your efforts are valued.

### Creating a New Feature or Bugfix

1. Before starting any work, check the [Issues](https://github.com/Emmanuel-Melon/planet-of-the-bugs/issues) section to see if the feature or bugfix you're considering is already being discussed. If not, you can open a new issue to discuss your proposal.

2. Once you have a clear idea of what you'd like to contribute, create a new branch from the `dev` branch:
```git checkout -b feature-or-bugfix-name``` <br>
**IMPORTANT**
* The naming convention for your branch should be as follows:
```BUG-<ISSUE_NUMBER>```
* The issue number should follow the ordered sequence.


### Making Changes

1. Make your changes in the appropriate files within your local repository.

2. Commit your changes with a descriptive commit message: git add . && git commit -m "Add a concise description of your changes"

### Submitting a Pull Request

1. Push your changes to your forked repository: git push origin feature-or-bugfix-name

2. Visit the original repository on GitHub and click the "Compare & pull request" button next to your branch.

3. Your pull request will be reviewed by maintainers, and feedback may be provided. Once your changes are approved, they will be merged into the main repository.

## Code of Conduct

Please review and adhere to our [Code of Conduct](CODE_OF_CONDUCT.md) throughout your participation in this project. We value an inclusive and welcoming environment for all contributors.

Thank you for taking the time to contribute to Planet Of The Bugs. Your efforts help make our project better for everyone!










15 changes: 6 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,13 @@

[![GitHub License](https://img.shields.io/badge/license-MIT-lightgrey.svg)](https://raw.githubusercontent.com/Emmanuel-Melon/planet-of-the-bugs/dev/LICENSE)

Welcome to "Planet of the Bugs," an extraordinary app that harnesses the power of AI to revolutionize your debugging skills. Imagine a realm where AI conjures unique bug scenarios, providing an unending source of challenges to hone your expertise. Navigate an intuitive online editor, merging theory and practice seamlessly. But that's not all – brace yourself for a journey beyond imagination.

Welcome to Planet of the Bugs, an innovative app that uses AI to generate unique bug scenarios for developers to practice and improve their debugging skills. The app also provides personalized training for teams, a built-in AI assistant for rubber-duck debugging, and many other exciting features.
Delve into real-world issues sourced from the GitHub galaxy, where you'll decipher intricate problems, unravel complexities, and emerge as a debugging virtuoso. Need a sidekick in your debugging quest? Look no further than our AI assistant, a trusty companion offering insights and it’s perfect for rubber-duck debugging.

Planet of the Bugs uses AI to generate fake bug scenarios for developers to learn debugging skills and the fundamentals of writing secure and robust software. Some of the key features of the app include:
Whether you're a solo explorer or part of a dynamic team, "Planet of the Bugs" offers tailor-made training and team-building experiences. Visionaries can craft custom courses, guiding novices through the labyrinth of programming intricacies. Collaborate with your peers, unravel cryptic bugs together, and ascend the leaderboard ranks.

- Endless supply of unique scenarios for practicing and honing skills
- Online editor for practicing theoretical knowledge
- Application of knowledge in solving real-world issues from GitHub
- Ability for experts to create courses for new developers
- Creating teams and courses to train on the company's stack
Step into a universe where learning knows no bounds, where AI transforms novices into virtuosos, and where debugging challenges are gateways to mastery. Experience a new era in software education with "Planet of the Bugs." Your journey to becoming a debugging legend begins now.

## 🚀 Demo

Expand Down Expand Up @@ -46,7 +43,7 @@ Our app offers a bounty hunting program to help companies crack bugs, so you can
## 🧑‍💻 How to Contribute
We welcome contributions from developers of all skill levels! If you're interested in contributing to Planet of the Bugs, please fork our repository and submit a pull request with your changes. We're always looking for ways to improve our app, so your contributions are greatly appreciated.

If you're not sure where to start, check out our Contributing Guidelines for more information on how to get involved. We also have a Code of Conduct that we expect all contributors to follow, so please take a few minutes to review it before getting started.
If you're not sure where to start, check out our [Contributing-Guidelines](CONTRIBUTING.md) for more information on how to get involved. We also have a [Code-of-Conduct](CODE-OF-CONDUCT.md) that we expect all contributors to follow, so please take a few minutes to review it before getting started.

Thank you for your interest in Planet of the Bugs! We look forward to working with you.

Expand Down Expand Up @@ -100,7 +97,7 @@ cp .example.env .env

### Thank You Note

We would like to extend our gratitude to Hashnode and MindsDB for hosting this amazing Hackathon. It has been an incredible opportunity to learn and work on this project.
We extend our heartfelt appreciation to the brilliant minds, tireless contributors, and visionary partners who have propelled this project's success. Thank you for reshaping how we learn and master debugging. Together, we're shaping the future of software education.

##
License
Expand Down
84 changes: 84 additions & 0 deletions apps/client/src/components/Chat/Conversation.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
<script>
const muzanURL =
"https://m.media-amazon.com/images/M/MV5BMzcyZjYxYzktMWZhMi00ZGFkLTllMTEtNjJjZjU4ODdlYzRmXkEyXkFqcGdeQXVyNjAwNDUxODI@._V1_.jpg";
const tengenURL =
"https://rare-gallery.com/thumbnail/1375991-tengen-uzui-sound-hashira-demon-slayer-anime-kimetsu-no-yaiba.jpg";
</script>

<div class="p-2 bg-base-200 h-2/4 overflow-y-auto">
<div class="chat chat-start">
<div class="chat-image avatar">
<div class="w-8 rounded-full">
<img src={muzanURL} alt="deadpool" />
</div>
</div>
<div class="chat-bubble bg-base-200 text-neutral-focus">
Ah, the Sound Hashira. It seems we have finally crossed paths. Quite
flashy!
</div>
</div>
<div class="chat chat-end">
<div class="chat-image avatar">
<div class="w-8 rounded-full">
<img src={tengenURL} alt="deadpool" />
</div>
</div>
<div class="chat-bubble">
Muzan Kibutsuji, your reign of terror ends here.
</div>
</div>
<div class="chat chat-start">
<div class="chat-image avatar">
<div class="w-8 rounded-full">
<img src={muzanURL} alt="deadpool" />
</div>
</div>
<div class="chat-bubble bg-base-200 text-neutral-focus">
Your resistance is futile. I will crush you and all the Demon Slayers who
dare oppose me.
</div>
</div>
<div class="chat chat-end">
<div class="chat-image avatar">
<div class="w-8 rounded-full">
<img src={tengenURL} alt="deadpool" />
</div>
</div>
<div class="chat-bubble">
Your empty threats won't intimidate me, Muzan.
</div>
</div>
<div class="chat chat-end">
<div class="chat-image avatar">
<div class="w-8 rounded-full">
<img src={tengenURL} alt="deadpool" />
</div>
</div>
<div class="chat-bubble">
Your arrogance blinds you, Muzan. We fight for a cause greater than
ourselves, a cause that protects humanity from the darkness you embody.
Your
</div>
</div>
<div class="chat chat-start">
<div class="chat-image avatar">
<div class="w-8 rounded-full">
<img src={muzanURL} alt="deadpool" />
</div>
</div>
<div class="chat-bubble bg-base-200 text-neutral-focus">
Prepare to witness the true terror of the Demong King!
</div>
</div>
<div class="chat chat-end">
<div class="chat-image avatar">
<div class="w-8 rounded-full">
<img src={tengenURL} alt="deadpool" />
</div>
</div>
<div class="chat-bubble">
We shall emerge victorious, for the sake of all the lives you've
destroyed. The sound of justice will drown out your tyranny.
</div>
</div>
</div>
17 changes: 17 additions & 0 deletions apps/client/src/components/Chat/ConversationMenu.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<script>

// class="prose prose-sm"
</script>
<div
class="flex justify-between items-center"
>
<div class="flex justify-between items-center w-full p-2">
<div class="flex items-center gap-4 prose prose-sm">
<h3 class="flex items-center">😈 Muzan Kibutsuji</h3>
</div>
<div class="flex items-center gap-2">
<button class="btn btn-sm btn-square"><iconify-icon icon="ri:equalizer-line" /></button>
<button class="btn btn-sm btn-square"> <iconify-icon icon="ri:information-line" /></button>
</div>
</div>
</div>
Empty file.
25 changes: 25 additions & 0 deletions apps/client/src/components/Lessons/LessonInteracticeContent.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<script>
export let lesson;
import CodeEditor from "$components/CodeEditor/CodeEditor.svelte";
import EditorTerminal from "$components/CodeEditor/EditorTerminal.svelte";
import EditorIFrame from "$components/CodeEditor/EditorIFrame.svelte";

export let sourceDoc = ``;

$: isExpanded = false;

const handleExpand = () => {
isExpanded = !isExpanded;
};
</script>

<section>
<div class="flex h-full">
<div class="basis-2/4">
<CodeEditor {handleExpand} {isExpanded} />
</div>
<div class="basis-2/4 h-full">
<EditorIFrame {sourceDoc} />
</div>
</div>
</section>
18 changes: 18 additions & 0 deletions apps/client/src/lib/appwrite/appwriteClient.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import {
PUBLIC_APPWRITE_ENDPOINT,
PUBLIC_APPWRITE_PROJECT_ID,
} from "$env/static/public";
import { Client as Appwrite, Databases, Account, Storage } from "appwrite";

const server = {
endpoint: PUBLIC_APPWRITE_ENDPOINT,
project: PUBLIC_APPWRITE_PROJECT_ID,
};

const client = new Appwrite();
const account = new Account(client);
const storage = new Storage(client);
client.setEndpoint(server.endpoint).setProject(server.project);

const sdk = { account, storage };
export { sdk, server };
33 changes: 33 additions & 0 deletions apps/client/src/lib/appwrite/appwriteServer.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
import {
PUBLIC_APPWRITE_ENDPOINT,
PUBLIC_APPWRITE_PROJECT_ID,
PUBLIC_APPWRITE_SECRET_KEY,
PUBLIC_APPWRITE_LOCAL_API_KEY,
} from "$env/static/public";
import sdk from "node-appwrite";

// Init SDK
const client = new sdk.Client();

const storage = new sdk.Storage(client);

const health = new sdk.Health(client);

client
.setEndpoint(PUBLIC_APPWRITE_ENDPOINT)
.setProject(PUBLIC_APPWRITE_PROJECT_ID)
.setKey(PUBLIC_APPWRITE_LOCAL_API_KEY);

(() => {
const promise = health.get();

promise.then(
function (response) {
console.log(response);
},
function (error) {
console.log(error);
}
);
})();
export const appwriteServer = { storage };
1 change: 1 addition & 0 deletions apps/client/src/lib/appwrite/functions/hello.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
console.log("Helllo, World!");
50 changes: 50 additions & 0 deletions apps/client/src/lib/github/githubGraphQLClient.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
import { PUBLIC_GITHUB_API_ENDPOINT } from "$env/static/public";
import { HttpLink, InMemoryCache, ApolloClient } from "@apollo/client/core";

type HttpLinkOptions = {
Authorization: string;
uri?: string;
};

type GitHubHttplink = HttpLinkOptions & {
Authorization: string | null;
};

export class GithubApi {
options: { Authorization: null; uri: any };
session: null;
client: null;
constructor(options: { Authorization: null; uri: any }) {
this.options = options;
this.session = null;
this.client = null;
}

setSession(session: any) {
this.session = session;
this.client = new ApolloClient({
cache: new InMemoryCache(),
credentials: "include",
link: this.createHttpLink(this.options),
});
}

getGithubClient() {
return this.client;
}

createHttpLink({ Authorization, uri }: HttpLinkOptions) {
return new HttpLink({
uri,
credentials: "same-origin",
headers: {
Authorization: `Bearer ${this.session}`,
},
});
}
}

export const GITHUB_API = new GithubApi({
Authorization: null,
uri: PUBLIC_GITHUB_API_ENDPOINT,
});
Loading