diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 854139a3..cddd872f 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1 +1,79 @@ -# 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) + - [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. + + +## 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``` +
+ + **IMPORTANT** + * The naming convention for your branch should be as follows: + ```BUG-``` + * 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! + + + + + + + + + + diff --git a/README.md b/README.md index b4b9f409..9efcaf64 100644 --- a/README.md +++ b/README.md @@ -9,15 +9,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 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. +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. -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: +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. -- 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 +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. + +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 @@ -44,15 +42,21 @@ Our app also features a job board for top contributors, so you can find exciting Our app offers a bounty hunting program to help companies crack bugs, so you can earn money while helping others. ## πŸ§‘β€πŸ’» 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. +We welcome contributions from developers of all skill levels! If you're interested in contributing to Planet of the Bugs, please clone 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](CONTRIBUTING.md) for more information on how to get involved. It will provide with a step-by-step guide on how to: -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. +- git Create a new feature or bugfix. +- Make changes to the codebase. +- Submit a pull request. + +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. ## How to Get Started -To get started with Planet of the Bugs, simply sign up for an account on our website and start exploring! Our app is easy to use and intuitive, so you can start practicing your debugging skills right away. +To get started with Planet of the Bugs, simply sign up for an account on our [website](https://planetofthebugs.xyz) and start exploring! Our app is easy to use and intuitive, so you can start practicing your debugging skills right away. ### Tech Stack - [Svelte]( https://svelte.dev/) @@ -67,40 +71,25 @@ To get started with Planet of the Bugs, simply sign up for an account on our web To set up the Planet of the Bugs project locally, follow these steps: -Clone the project from the GitHub repository. - -Clone the repository to your local machine by running the following command in your terminal: - -
-$ git clone https://github.com/Emmanuel-Melon/planet-of-the-bugs/ && git checkout dev
-
- -Install the necessary dependencies by running the following command in your terminal: - -
-$ yarn install && yarn dev
-
- -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. - -### Local Setup - -To get started, copy the .example.env file to .env by running the following command in your terminal: - -```bash -cp .example.env .env -``` +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. ### 🦾 Contributors - **Emmanuel Gatwech (Eman)**: [LinkedIn Profile](https://www.linkedin.com/in/emmanuel-gatwech/), [Twitter](https://twitter.com/junubiman), [Hashnode](https://eman.hashnode.dev/), [Portfolio](https://e-man.vercel.app/). - **Magid Faiz**: [LinkedIn Profile](https://www.linkedin.com/in/maiz27/), [Hashnode Profile](https://hashnode.com/@Maiz), [Portfolio](https://maged-faiz.web.app/). - +- **Leona Magaya**: [LinkedIn Profile](https://www.linkedin.com/in/leonamagayachinyerere/). ### 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 diff --git a/apps/client/src/components/Chat/Conversation.svelte b/apps/client/src/components/Chat/Conversation.svelte new file mode 100644 index 00000000..91520798 --- /dev/null +++ b/apps/client/src/components/Chat/Conversation.svelte @@ -0,0 +1,84 @@ + + +
+
+
+
+ deadpool +
+
+
+ Ah, the Sound Hashira. It seems we have finally crossed paths. Quite + flashy! +
+
+
+
+
+ deadpool +
+
+
+ Muzan Kibutsuji, your reign of terror ends here. +
+
+
+
+
+ deadpool +
+
+
+ Your resistance is futile. I will crush you and all the Demon Slayers who + dare oppose me. +
+
+
+
+
+ deadpool +
+
+
+ Your empty threats won't intimidate me, Muzan. +
+
+
+
+
+ deadpool +
+
+
+ Your arrogance blinds you, Muzan. We fight for a cause greater than + ourselves, a cause that protects humanity from the darkness you embody. + Your +
+
+
+
+
+ deadpool +
+
+
+ Prepare to witness the true terror of the Demong King! +
+
+
+
+
+ deadpool +
+
+
+ We shall emerge victorious, for the sake of all the lives you've + destroyed. The sound of justice will drown out your tyranny. +
+
+
diff --git a/apps/client/src/components/Chat/ConversationMenu.svelte b/apps/client/src/components/Chat/ConversationMenu.svelte new file mode 100644 index 00000000..bbef130a --- /dev/null +++ b/apps/client/src/components/Chat/ConversationMenu.svelte @@ -0,0 +1,17 @@ + +
+
+
+

😈 Muzan Kibutsuji

+
+
+ + +
+
+
\ No newline at end of file diff --git a/apps/client/src/components/EmptyStates/ChatEmptyState.svelte b/apps/client/src/components/EmptyStates/ChatEmptyState.svelte new file mode 100644 index 00000000..e69de29b diff --git a/apps/client/src/components/EmptyStates/Notifications.svelte b/apps/client/src/components/EmptyStates/Notifications.svelte new file mode 100644 index 00000000..e69de29b diff --git a/apps/client/src/components/EmptyStates/NotificationsEmptyState.svelte b/apps/client/src/components/EmptyStates/NotificationsEmptyState.svelte new file mode 100644 index 00000000..9336ba91 --- /dev/null +++ b/apps/client/src/components/EmptyStates/NotificationsEmptyState.svelte @@ -0,0 +1,7 @@ + + + + + + + diff --git a/apps/client/src/components/Lessons/LessonInteracticeContent.svelte b/apps/client/src/components/Lessons/LessonInteracticeContent.svelte new file mode 100644 index 00000000..6868cb74 --- /dev/null +++ b/apps/client/src/components/Lessons/LessonInteracticeContent.svelte @@ -0,0 +1,25 @@ + + +
+
+
+ +
+
+ +
+
+
diff --git a/apps/client/src/lib/appwrite/appwriteClient.ts b/apps/client/src/lib/appwrite/appwriteClient.ts new file mode 100644 index 00000000..4e44834d --- /dev/null +++ b/apps/client/src/lib/appwrite/appwriteClient.ts @@ -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 }; diff --git a/apps/client/src/lib/appwrite/appwriteServer.ts b/apps/client/src/lib/appwrite/appwriteServer.ts new file mode 100644 index 00000000..fd214b2f --- /dev/null +++ b/apps/client/src/lib/appwrite/appwriteServer.ts @@ -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 }; diff --git a/apps/client/src/lib/appwrite/functions/hello.ts b/apps/client/src/lib/appwrite/functions/hello.ts new file mode 100644 index 00000000..f1fb99f4 --- /dev/null +++ b/apps/client/src/lib/appwrite/functions/hello.ts @@ -0,0 +1 @@ +console.log("Helllo, World!"); diff --git a/apps/client/src/lib/github/githubGraphQLClient.ts b/apps/client/src/lib/github/githubGraphQLClient.ts new file mode 100644 index 00000000..67c7558a --- /dev/null +++ b/apps/client/src/lib/github/githubGraphQLClient.ts @@ -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, +}); diff --git a/apps/client/src/routes/[username]/+page.ts b/apps/client/src/routes/[username]/+page.ts new file mode 100644 index 00000000..c6ebbebe --- /dev/null +++ b/apps/client/src/routes/[username]/+page.ts @@ -0,0 +1,102 @@ +import apolloClient from "$lib/graphql/apolloClient"; +import { GITHUB_API } from "$lib/github/githubGraphQLClient"; + +import { + GET_USER_BASIC_INFO_BY_USERNAME, + GET_GITHUB_USER_BASIC_INFO_BY_GITHUB_USERNAME, + GET_REPOS_CONTRIBUTED_TO_BY_GITHUB_USERNAME, + GET_PINNED_ITEMS_BY_GITHUB_USERNAME, +} from "$lib/graphql/queries/user"; + +import { + GET_SUBSCRIBED_REPOS, + GET_USER_REPOS_BY_GITHUB_USERNAME, +} from "$lib/graphql/queries/repositories"; + +export const load = async (event) => { + const { params, parent } = event; + + const { session } = await parent(); + + if (session?.token) { + GITHUB_API.setSession(session.token.accessToken); + } + + let user = session?.user; + let githubProfileData = null; + const currentUser = user?.username === params?.username; + + if (!currentUser) { + const { data } = await apolloClient.query({ + query: GET_USER_BASIC_INFO_BY_USERNAME, + variables: { + username: params.username, + }, + }); + + user = data.user[0]; + } + + if (user?.hasConnectedGithub) { + const githubClient = GITHUB_API.getGithubClient(); + + const [ + githubUserData, + contributedTo, + pinnedItems, + ownedRepos, + subscribedRepos, + ] = await Promise.all([ + githubClient.query({ + query: GET_GITHUB_USER_BASIC_INFO_BY_GITHUB_USERNAME, + variables: { + username: user.githubUsername, + }, + }), + githubClient.query({ + query: GET_REPOS_CONTRIBUTED_TO_BY_GITHUB_USERNAME, + variables: { + username: user.githubUsername, + }, + }), + githubClient.query({ + query: GET_PINNED_ITEMS_BY_GITHUB_USERNAME, + variables: { + username: user.githubUsername, + }, + }), + githubClient.query({ + query: GET_USER_REPOS_BY_GITHUB_USERNAME, + variables: { + username: user.githubUsername, + }, + }), + apolloClient.query({ + query: GET_SUBSCRIBED_REPOS, + variables: { + user_id: user.id, + }, + }), + ]); + + const githubUser = githubUserData.data.user; + const contributionData = contributedTo.data.user.repositoriesContributedTo; + const topRepoData = pinnedItems.data.user.pinnedItems; + const repositories = ownedRepos.data.user?.repositories; + const subscribedTo = subscribedRepos.data.user_subscribed_repos; + + githubProfileData = { + githubUser, + repositories, + subscribedTo, + contributedTo: contributionData, + pinnedItems: topRepoData, + }; + } + + return { + currentUser, + user, + githubProfileData, + }; +}; diff --git a/apps/client/src/routes/bugs/+page.ts b/apps/client/src/routes/bugs/+page.ts new file mode 100644 index 00000000..6f41477e --- /dev/null +++ b/apps/client/src/routes/bugs/+page.ts @@ -0,0 +1,12 @@ +import type { LayoutServerLoad } from "./$types"; +import { + redirectUnAuthenticatedUsers, + refreshGitHubAccessToken, + validateGitHubAccessToken, +} from "$lib/auth/helpers"; + +export const load = (async (event) => { + const { parent, fetch, depends, data: pageData } = event; + const { session } = await parent(); + redirectUnAuthenticatedUsers(session, [307, "/auth"]); +}) satisfies LayoutServerLoad; diff --git a/apps/client/src/routes/courses/[slug]/+page.ts b/apps/client/src/routes/courses/[slug]/+page.ts new file mode 100644 index 00000000..a83f6b75 --- /dev/null +++ b/apps/client/src/routes/courses/[slug]/+page.ts @@ -0,0 +1,44 @@ +import { + FETCH_COURSE_BY_SLUG, + FETCH_USER_COURSE_PROGRESS, +} from "$lib/graphql/queries/courses"; +import { GET_USER_BY_EMAIL } from "$lib/graphql/queries/user"; +import apolloClient from "$lib/graphql/apolloClient"; +import { GITHUB_API } from "$lib/github/githubGraphQLClient"; +import { error } from "@sveltejs/kit"; + +export const load = async (event) => { + const { params, parent } = event; + const { session } = await parent(); + + const { slug } = params; + + const { data } = await apolloClient.query({ + query: FETCH_COURSE_BY_SLUG, + variables: { slug }, + }); + + const { data: userInfo } = await apolloClient.query({ + query: GET_USER_BY_EMAIL, + variables: { + email: session?.user?.email, + }, + }); + + const course = data.courses[0]; + + const activeCourse = await apolloClient.query({ + query: FETCH_USER_COURSE_PROGRESS, + variables: { + userId: userInfo.user[0].id, + courseId: course.id, + }, + }); + + const active = activeCourse.data.user_courses[0]; + + return { + course, + active, + }; +}; diff --git a/apps/client/src/routes/messages/+page.svelte b/apps/client/src/routes/messages/+page.svelte index 02e509dd..0d1a7f34 100644 --- a/apps/client/src/routes/messages/+page.svelte +++ b/apps/client/src/routes/messages/+page.svelte @@ -1,5 +1,6 @@
- - - +
diff --git a/apps/client/src/routes/profile/+layout.server.ts b/apps/client/src/routes/profile/+layout.server.ts new file mode 100644 index 00000000..b1f968fe --- /dev/null +++ b/apps/client/src/routes/profile/+layout.server.ts @@ -0,0 +1,9 @@ +import { redirect } from "@sveltejs/kit"; +import type { LayoutServerLoad } from "./$types"; + +export const load = (async (event) => { + const session = await event.locals.getSession(); + if (session === null) { + throw redirect(307, "/auth"); + } +}) satisfies LayoutServerLoad; diff --git a/apps/client/src/routes/profile/+page.ts b/apps/client/src/routes/profile/+page.ts new file mode 100644 index 00000000..ff87bc88 --- /dev/null +++ b/apps/client/src/routes/profile/+page.ts @@ -0,0 +1,108 @@ +import { + GITHUB_GET_USER_BY_EMAIL, + REPOS_CONTRIBUTED_TO, + GET_PINNED_ITEMS, + GET_USER_BY_EMAIL, +} from "$lib/graphql/queries/user"; + +import { + GET_SUBSCRIBED_REPOS, + GET_USER_REPOS, + GET_CONTRIBUTIONS_BY_REPO, + GET_USER_PULL_REQUEST_CONTRIBUTIONS, +} from "$lib/graphql/queries/repositories"; +import apolloClient from "$lib/graphql/apolloClient"; +import { GITHUB_API } from "$lib/github/githubGraphQLClient"; +import { destructureQueryResults } from "$lib/graphql/helpers"; +import { redirectUnAuthenticatedUsers } from "$lib/auth/helpers"; + +export const load = async (event) => { + const { + params, + url, + setHeaders, + route, + parent, + fetch, + depends, + data: pageData, + } = event; + + const { session } = await parent(); + redirectUnAuthenticatedUsers(session, [307, "/auth"]); + + GITHUB_API.setSession(session?.token?.accessToken); + const githubClient = GITHUB_API.getGithubClient(); + + const { data } = await githubClient.query({ + query: GITHUB_GET_USER_BY_EMAIL, + }); + + const [githubUser, user] = await Promise.all([ + githubClient.query({ + query: GITHUB_GET_USER_BY_EMAIL, + }), + apolloClient.query({ + query: GET_USER_BY_EMAIL, + variables: { + email: session?.user?.email, + }, + }), + ]); + + const { + data: { user: destructuredUserObject, loading: profileLoading }, + } = user; + + const output = destructureQueryResults(githubUser); + + const { result: destructuredGithubUser, loading: gitHubrofileLoading } = + output; + + const userInfo = destructuredUserObject[0]; + + const subscribedRepos = await apolloClient.query({ + query: GET_SUBSCRIBED_REPOS, + variables: { + user_id: userInfo.id, + }, + }); + + const [contributedTo, pinnedItems, ownedRepos] = await Promise.all([ + githubClient.query({ + query: REPOS_CONTRIBUTED_TO, + }), + githubClient.query({ + query: GET_PINNED_ITEMS, + variables: { + login: data?.viewer?.login, + }, + }), + githubClient.query({ + query: GET_USER_REPOS, + variables: { + login: data?.viewer?.login, + }, + }), + ]); + + const { data: contributionData } = contributedTo; + const { data: topRepoData } = pinnedItems; + const { data: repositories } = ownedRepos; + const { data: subscribedTo } = subscribedRepos; + + return { + github_user: { + destructuredGithubUser, + gitHubrofileLoading, + }, + currentUser: { ...userInfo, profileLoading }, + user: { + ...data, + }, + contributedTo: { ...contributionData.viewer.repositoriesContributedTo }, + pinnedItems: topRepoData.user.pinnedItems, + repositories: repositories?.user?.repositories, + subscribedTo: subscribedTo?.user_subscribed_repos, + }; +}; diff --git a/apps/client/src/routes/profile/store.ts b/apps/client/src/routes/profile/store.ts new file mode 100644 index 00000000..805e27af --- /dev/null +++ b/apps/client/src/routes/profile/store.ts @@ -0,0 +1,3 @@ +import { writable } from "svelte/store"; + +export const loggedInUserStore = writable(null); diff --git a/yarn.lock b/yarn.lock index 956fb78e..f455ef9f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1498,6 +1498,11 @@ resolved "https://registry.yarnpkg.com/@svelteuidev/composables/-/composables-0.10.0.tgz#894a230ee6e3d1361a8811ddb77d603904d7d841" integrity sha512-6fmwFX9BSsF5jbEdrGqBloC0Knx5lyj7HjjZyD/hT6iKKeP/xDbNMfOLwIBqcBu4HN2EIWnLzvKBVeqoVKonWA== +"@svelteuidev/composables@^0.12.1": + version "0.12.1" + resolved "https://registry.yarnpkg.com/@svelteuidev/composables/-/composables-0.12.1.tgz#1782ee826aadbcc58d5df32338e4614cc4570fa2" + integrity sha512-4w17gQex9mcJZhYvzuKxT5X1bDVWJQFjThZif32DKEKi9iL9adD2zScckjidEnP8kHZBntEhUF7a64ofgNtRsA== + "@svelteuidev/core@^0.10.0": version "0.10.0" resolved "https://registry.yarnpkg.com/@svelteuidev/core/-/core-0.10.0.tgz#8635160c90aade9eb44f5991b9c13ddea69e3c6f" @@ -1506,6 +1511,14 @@ "@floating-ui/dom" "0.5.2" "@stitches/core" "1.2.8" +"@svelteuidev/core@^0.12.1": + version "0.12.1" + resolved "https://registry.yarnpkg.com/@svelteuidev/core/-/core-0.12.1.tgz#3b11e1b9ac287183237605efd01424068ff27e31" + integrity sha512-dWpGl2ATc7BMLZLtK7eg4OPMP1AGlfWW+cxjeAPAwcjS/AimvnXo5fNwHHnRNRG2r3fGW1LHTXROHByPHQw0OA== + dependencies: + "@floating-ui/dom" "0.5.2" + "@stitches/core" "1.2.8" + "@svelteuidev/dates@^0.10.0": version "0.10.0" resolved "https://registry.yarnpkg.com/@svelteuidev/dates/-/dates-0.10.0.tgz#2d86775008481297d6523af99c834ba0abb1d435" @@ -1513,16 +1526,33 @@ dependencies: dayjs "1.11.1" +"@svelteuidev/dates@^0.12.1": + version "0.12.1" + resolved "https://registry.yarnpkg.com/@svelteuidev/dates/-/dates-0.12.1.tgz#030fa490a4e8456d76c7908a23584234aea5d916" + integrity sha512-fdmjXK+k7J2tVE3ENGLgjLHPgce3oYKigrhSvSDXJ+f4SoPJuFDuYGUS3Q20QgSxsGkr6OV1Mu36V/vP3lADBw== + dependencies: + dayjs "1.11.1" + "@svelteuidev/motion@^0.10.0": version "0.10.0" resolved "https://registry.yarnpkg.com/@svelteuidev/motion/-/motion-0.10.0.tgz#06aff9d51aa58fc57d64f57f874bfda5b3ed072a" integrity sha512-WJlqQVfTiv8PScD9MXW3p2VHBSuzoHsaktejOHY+5y1MQPUHTDndLLacbfoJJe1bxPNrwsZQGEZOs7L0aJ4/Zg== +"@svelteuidev/motion@^0.12.1": + version "0.12.1" + resolved "https://registry.yarnpkg.com/@svelteuidev/motion/-/motion-0.12.1.tgz#cef274594295f51b80f1e75a2ed01ab1df301f58" + integrity sha512-q4t8ge6RiOtI5JXGXkMX6TcdHjukFowMjr/fpXnKyMBilEYhjCTYH/7e75XWSdhW87XR4/tKSaExAvVCUZHeyg== + "@svelteuidev/preprocessors@^0.10.0": version "0.10.0" resolved "https://registry.yarnpkg.com/@svelteuidev/preprocessors/-/preprocessors-0.10.0.tgz#c34863d1e8eb8102edb3adb0383eaf45bf665cbd" integrity sha512-IcCCxh4Tv7VTCxEoxjkez1ZYR4oR6FjX1jDqR/wJleZ50JXnupb/o/mCFscwljLqVuIEcuWFCKhDUlCRe4MLpA== +"@svelteuidev/preprocessors@^0.12.1": + version "0.12.1" + resolved "https://registry.yarnpkg.com/@svelteuidev/preprocessors/-/preprocessors-0.12.1.tgz#c4f5236fc45fb77cf2c6877097e196ca588b770f" + integrity sha512-odxmj9NWcRb9xJmRqtJ7IdWcC0YTOwtMy7UNpwhYhEAMeWqeq/cStQLeeR8sDgiXcrUfDZ4tXhznIuZp0uNOhQ== + "@svelteuidev/prism@^0.10.0": version "0.10.0" resolved "https://registry.yarnpkg.com/@svelteuidev/prism/-/prism-0.10.0.tgz#dd60ceefaf97873c256568154e36da6dce53713c" @@ -1531,6 +1561,14 @@ prism-svelte "0.5.0" prismjs "1.28.0" +"@svelteuidev/prism@^0.12.1": + version "0.12.1" + resolved "https://registry.yarnpkg.com/@svelteuidev/prism/-/prism-0.12.1.tgz#82fd283e9ca18aaaf2e3fc8a2e1c2c98ab2cec1f" + integrity sha512-DU2/NKJhxmcnqoiva/j/2js1LS88EkQg3FxE7iXQbkFxCMuquCcmn76LjEN1CnRXpDKOlzS4vBYopryb6g4wWQ== + dependencies: + prism-svelte "0.5.0" + prismjs "1.28.0" + "@tailwindcss/typography@^0.5.9": version "0.5.9" resolved "https://registry.yarnpkg.com/@tailwindcss/typography/-/typography-0.5.9.tgz#027e4b0674929daaf7c921c900beee80dbad93e8" @@ -2245,6 +2283,14 @@ apollo-utilities@^1.3.0: ts-invariant "^0.4.0" tslib "^1.10.0" +appwrite@^11.0.0: + version "11.0.1" + resolved "https://registry.yarnpkg.com/appwrite/-/appwrite-11.0.1.tgz#dbf542464915edd10cf45aab8586c4dc19b89fe1" + integrity sha512-o8ag5sc/KwpwB5MGswI7DdvStMjz3PKYmN1RyfLwofk7lQUbHBkY/pMB6zgk21Y5bbQRX+Ca4MbbSOMV+VC1cQ== + dependencies: + cross-fetch "3.1.5" + isomorphic-form-data "2.0.0" + "aproba@^1.0.3 || ^2.0.0": version "2.0.0" resolved "https://registry.yarnpkg.com/aproba/-/aproba-2.0.0.tgz#52520b8ae5b569215b354efc0caa3fe1e45a8adc" @@ -2345,6 +2391,15 @@ axios@^1.3.2: form-data "^4.0.0" proxy-from-env "^1.1.0" +axios@^1.3.6: + version "1.5.0" + resolved "https://registry.yarnpkg.com/axios/-/axios-1.5.0.tgz#f02e4af823e2e46a9768cfc74691fdd0517ea267" + integrity sha512-D4DdjDo5CY50Qms0qGQTTw6Q44jl7zRwY7bthds06pUGfChBCTcQs+N743eFWGEd6pRTMd6A+I87aWyFV5wiZQ== + dependencies: + follow-redirects "^1.15.0" + form-data "^4.0.0" + proxy-from-env "^1.1.0" + babel-plugin-syntax-trailing-function-commas@^7.0.0-beta.0: version "7.0.0-beta.0" resolved "https://registry.yarnpkg.com/babel-plugin-syntax-trailing-function-commas/-/babel-plugin-syntax-trailing-function-commas-7.0.0-beta.0.tgz#aa213c1435e2bffeb6fca842287ef534ad05d5cf" @@ -2823,12 +2878,17 @@ color@^4.2: color-convert "^2.0.1" color-string "^1.9.0" +colord@^2.9: + version "2.9.3" + resolved "https://registry.yarnpkg.com/colord/-/colord-2.9.3.tgz#4f8ce919de456f1d5c1c368c307fe20f3e59fb43" + integrity sha512-jeC1axXpnb0/2nn/Y1LPuLdgXBLH7aDcHu4KEKfqw3CUhX7ZpfBSlPKyqXE6btIgEzfWtrX3/tyBCaCvXvMkOw== + colorette@^2.0.16: version "2.0.20" resolved "https://registry.yarnpkg.com/colorette/-/colorette-2.0.20.tgz#9eb793e6833067f7235902fcd3b09917a000a95a" integrity sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w== -combined-stream@^1.0.8: +combined-stream@^1.0.6, combined-stream@^1.0.8: version "1.0.8" resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f" integrity sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg== @@ -2939,6 +2999,13 @@ create-require@^1.1.0: resolved "https://registry.yarnpkg.com/create-require/-/create-require-1.1.1.tgz#c1d7e8f1e5f6cfc9ff65f9cd352d37348756c333" integrity sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ== +cross-fetch@3.1.5: + version "3.1.5" + resolved "https://registry.yarnpkg.com/cross-fetch/-/cross-fetch-3.1.5.tgz#e1389f44d9e7ba767907f7af8454787952ab534f" + integrity sha512-lvb1SBsI0Z7GDwmuid+mU3kWVBwTVUbe7S0H52yaaAdQOXq2YktTCZdlAcNKFzE6QtRz0snpw9bNiPeOIkkQvw== + dependencies: + node-fetch "2.6.7" + cross-fetch@^3.1.5: version "3.1.8" resolved "https://registry.yarnpkg.com/cross-fetch/-/cross-fetch-3.1.8.tgz#0327eba65fd68a7d119f8fb2bf9334a1a7956f82" @@ -2955,7 +3022,7 @@ cross-spawn@7.0.3, cross-spawn@^7.0.2, cross-spawn@^7.0.3: shebang-command "^2.0.0" which "^2.0.1" -css-selector-tokenizer@^0.8.0: +css-selector-tokenizer@^0.8, css-selector-tokenizer@^0.8.0: version "0.8.0" resolved "https://registry.yarnpkg.com/css-selector-tokenizer/-/css-selector-tokenizer-0.8.0.tgz#88267ef6238e64f2215ea2764b3e2cf498b845dd" integrity sha512-Jd6Ig3/pe62/qe5SBPTN8h8LeUg/pT4lLgtavPf7updwwHpvFzxvOQBHYj2LZDMjUnBzgvIUSjRcf6oT5HzHFg== @@ -2968,7 +3035,7 @@ cssesc@^3.0.0: resolved "https://registry.yarnpkg.com/cssesc/-/cssesc-3.0.0.tgz#37741919903b868565e1c09ea747445cd18983ee" integrity sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg== -daisyui@^2.51.4: +daisyui@^2.51.4, daisyui@^2.51.6: version "2.52.0" resolved "https://registry.yarnpkg.com/daisyui/-/daisyui-2.52.0.tgz#1e22abd655bf4a5cb466e1a1f264bb597e9ec254" integrity sha512-LQTA5/IVXAJHBMFoeaEMfd7/akAFPPcdQPR3O9fzzcFiczneJFM73CFPnScmW2sOgn/D83cvkP854ep2T9OfTg== @@ -2978,6 +3045,17 @@ daisyui@^2.51.4: postcss-js "^4.0.0" tailwindcss "^3" +daisyui@^3.1.6: + version "3.7.3" + resolved "https://registry.yarnpkg.com/daisyui/-/daisyui-3.7.3.tgz#247cfefa0112c31679af9035eff65e1bd866f062" + integrity sha512-gKlz3RwfaukZxf8nQZsDAZ7quUSi7F8HjGGB34tkHruvfQB9cgVDQsmqUqSQtkAJYvzbrg/3dLUa9+5jF4iC1A== + dependencies: + colord "^2.9" + css-selector-tokenizer "^0.8" + postcss "^8" + postcss-js "^4" + tailwindcss "^3" + dataloader@^2.2.2: version "2.2.2" resolved "https://registry.yarnpkg.com/dataloader/-/dataloader-2.2.2.tgz#216dc509b5abe39d43a9b9d97e6e5e473dfbe3e0" @@ -3643,6 +3721,15 @@ follow-redirects@^1.14.0, follow-redirects@^1.15.0: resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.2.tgz#b460864144ba63f2681096f274c4e57026da2c13" integrity sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA== +form-data@^2.3.2: + version "2.5.1" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.5.1.tgz#f2cbec57b5e59e23716e128fe44d4e5dd23895f4" + integrity sha512-m21N3WOmEEURgk6B9GLOE4RuWOFf28Lhh9qGYeNlGq4VDXUlJy2th2slBNU8Gp8EzloYZOibZJ7t5ecIrFSjVA== + dependencies: + asynckit "^0.4.0" + combined-stream "^1.0.6" + mime-types "^2.1.12" + form-data@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/form-data/-/form-data-4.0.0.tgz#93919daeaf361ee529584b9b31664dc12c9fa452" @@ -4010,6 +4097,13 @@ iconify-icon@^1.0.7: dependencies: "@iconify/types" "^2.0.0" +iconify-icon@^1.0.8: + version "1.0.8" + resolved "https://registry.yarnpkg.com/iconify-icon/-/iconify-icon-1.0.8.tgz#ad7a36731dca0da0204e488ef0b9ebdad2a7d760" + integrity sha512-jvbUKHXf8EnGGArmhlP2IG8VqQLFFyTvTqb9LVL2TKTh7/eCCD1o2HHE9thpbJJb6B8hzhcFb6rOKhvo7reNKA== + dependencies: + "@iconify/types" "^2.0.0" + iconv-lite@^0.4.24: version "0.4.24" resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" @@ -4283,6 +4377,13 @@ isexe@^2.0.0: resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" integrity sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw== +isomorphic-form-data@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/isomorphic-form-data/-/isomorphic-form-data-2.0.0.tgz#9f6adf1c4c61ae3aefd8f110ab60fb9b143d6cec" + integrity sha512-TYgVnXWeESVmQSg4GLVbalmQ+B4NPi/H4eWxqALKj63KsUrcu301YDjBqaOw3h+cbak7Na4Xyps3BiptHtxTfg== + dependencies: + form-data "^2.3.2" + isomorphic-ws@5.0.0, isomorphic-ws@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/isomorphic-ws/-/isomorphic-ws-5.0.0.tgz#e5529148912ecb9b451b46ed44d53dae1ce04bbf" @@ -4861,6 +4962,21 @@ no-case@^3.0.4: lower-case "^2.0.2" tslib "^2.0.3" +node-appwrite@^9.0.0: + version "9.0.0" + resolved "https://registry.yarnpkg.com/node-appwrite/-/node-appwrite-9.0.0.tgz#75d892e83f3b820a32b4bf888d5403afdc59e577" + integrity sha512-iTcHbuaJfr6bP/HFkRVV+FcaumKkbINqZyypQdl+tYxv6Dx0bkB/YKUXGYfTkgP18TLPWQQB++OGQhi98dlo2w== + dependencies: + axios "^1.3.6" + form-data "^4.0.0" + +node-fetch@2.6.7: + version "2.6.7" + resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.7.tgz#24de9fba827e3b4ae44dc8b20256a379160052ad" + integrity sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ== + dependencies: + whatwg-url "^5.0.0" + node-fetch@^1.5.3: version "1.7.3" resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-1.7.3.tgz#980f6f72d85211a5347c6b2bc18c5b84c3eb47ef" @@ -5399,7 +5515,7 @@ postcss-import@^15.1.0: read-cache "^1.0.0" resolve "^1.1.7" -postcss-js@^4.0.0, postcss-js@^4.0.1: +postcss-js@^4, postcss-js@^4.0.0, postcss-js@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/postcss-js/-/postcss-js-4.0.1.tgz#61598186f3703bab052f1c4f7d805f3991bee9d2" integrity sha512-dDLF8pEO191hJMtlHFPRa8xsizHaM82MLfNkUHdUtVEV3tgTp5oj+8qbEqYM57SLfc74KSbw//4SeJma2LRVIw== @@ -5455,6 +5571,15 @@ postcss-value-parser@^4.0.0, postcss-value-parser@^4.2.0: resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz#723c09920836ba6d3e5af019f92bc0971c02e514" integrity sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ== +postcss@^8, postcss@^8.4.24: + version "8.4.29" + resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.29.tgz#33bc121cf3b3688d4ddef50be869b2a54185a1dd" + integrity sha512-cbI+jaqIeu/VGqXEarWkRCCffhjgXc0qjBtXpqJhTBohMUjUQnbBr0xqX3vEKudc4iviTewcJo5ajcec5+wdJw== + dependencies: + nanoid "^3.3.6" + picocolors "^1.0.0" + source-map-js "^1.0.2" + postcss@^8.3.11, postcss@^8.4.21, postcss@^8.4.23, postcss@^8.4.5: version "8.4.24" resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.24.tgz#f714dba9b2284be3cc07dbd2fc57ee4dc972d2df" @@ -6415,6 +6540,34 @@ tailwindcss@^3, tailwindcss@^3.2.7: resolve "^1.22.2" sucrase "^3.32.0" +tailwindcss@^3.3.2: + version "3.3.3" + resolved "https://registry.yarnpkg.com/tailwindcss/-/tailwindcss-3.3.3.tgz#90da807393a2859189e48e9e7000e6880a736daf" + integrity sha512-A0KgSkef7eE4Mf+nKJ83i75TMyq8HqY3qmFIJSWy8bNt0v1lG7jUcpGpoTFxAwYcWOphcTBLPPJg+bDfhDf52w== + dependencies: + "@alloc/quick-lru" "^5.2.0" + arg "^5.0.2" + chokidar "^3.5.3" + didyoumean "^1.2.2" + dlv "^1.1.3" + fast-glob "^3.2.12" + glob-parent "^6.0.2" + is-glob "^4.0.3" + jiti "^1.18.2" + lilconfig "^2.1.0" + micromatch "^4.0.5" + normalize-path "^3.0.0" + object-hash "^3.0.0" + picocolors "^1.0.0" + postcss "^8.4.23" + postcss-import "^15.1.0" + postcss-js "^4.0.1" + postcss-load-config "^4.0.1" + postcss-nested "^6.0.1" + postcss-selector-parser "^6.0.11" + resolve "^1.22.2" + sucrase "^3.32.0" + tar@^6.1.11: version "6.1.15" resolved "https://registry.yarnpkg.com/tar/-/tar-6.1.15.tgz#c9738b0b98845a3b344d334b8fa3041aaba53a69"