Skip to content

Commit

Permalink
format files
Browse files Browse the repository at this point in the history
  • Loading branch information
Mridul2820 committed Jun 11, 2022
1 parent 70eed80 commit 9e581fb
Show file tree
Hide file tree
Showing 35 changed files with 1,662 additions and 1,542 deletions.
8 changes: 4 additions & 4 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"presets": ["next/babel"],
"plugins": [["styled-components", { "ssr": true }]]
}
{
"presets": ["next/babel"],
"plugins": [["styled-components", { "ssr": true }]]
}
12 changes: 6 additions & 6 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"extends": "next",
"rules": {
"@next/next/no-img-element": "off",
"@next/next/no-document-import-in-page": "off"
}
}
"extends": "next",
"rules": {
"@next/next/no-img-element": "off",
"@next/next/no-document-import-in-page": "off"
}
}
26 changes: 20 additions & 6 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,40 +4,54 @@

1. [Fork][fork-link] the repository [Git o Get](https://github.com/Mridul2820/git-o-get/fork).
2. [Clone][clone-link] your new fork of the repository locally.

```
git clone https://github.com/<your-github-username>/git-o-get
```

3. Set upstream command

```
git remote add upstream https://github.com/Mridul2820/git-o-get.git
```

4. Navigate to the new project directory:

```
cd git-o-get
```

5. Create Your own [branch][branch-link]

```
git checkout -b <YOUR_BRANCH_NAME>
```

6. [Run it Locally](https://github.com/Mridul2820/git-o-get#run-locally-)
7. Add yor changes

```
git add .
```

8. Commit your changes with a meaningful message

```
git checkout -m "<Your Message>"
```

9. Push your local commits to the remote repository

```
git push origin <YOUR_BRANCH_NAME>
```

10. Create a[ Pull request](pull-request)
11. **Congratulations!** You've made your **first contribution!** 🙌🏼

[repo-link]: <https://github.com/Mridul2820/git-o-get/fork>
[branch-link]: <http://guides.github.com/introduction/flow/>
[clone-link]: <https://help.github.com/articles/cloning-a-repository/>
[fork-link]: <http://guides.github.com/activities/forking/>
[syncing-link]: <https://help.github.com/articles/syncing-a-fork>
[pull-request]: <https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request/>
[repo-link]: https://github.com/Mridul2820/git-o-get/fork
[branch-link]: http://guides.github.com/introduction/flow/
[clone-link]: https://help.github.com/articles/cloning-a-repository/
[fork-link]: http://guides.github.com/activities/forking/
[syncing-link]: https://help.github.com/articles/syncing-a-fork
[pull-request]: https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request/
33 changes: 25 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,17 @@
<a href="LICENSE">License</a>
</div>


<br />
<br />

## What it does 🤔

- Just seach your github username and get your profile data in a different way
- This app also generates a shareable card dynamically
- The card is downloadable also

## Contents 🧧

- Profile Details
- Language Crad
- Shareable Social Card
Expand All @@ -37,6 +38,7 @@
- Most Stared Repository Graph

## Tech Stack 👾

- [Next JS](https://nextjs.org/)
- [Tailwind](https://tailwindcss.com/)
- [Recoil](https://recoiljs.org/)
Expand All @@ -47,50 +49,65 @@
- [Cloudinary](https://cloudinary.com/)

## Demo 🌍

This app is Deployed to Vercel
<br />
[View Demo](https://git-o-get.mridul.tech/)

## SnapShots 💻

### Home Page

<img src="/public/assets/app-home.png" align="center"/>

### User Detail Page

<img src="/public/assets/app-snapshot.png" align="center"/>

## Prerequisites '✔

Required to install and run the software:
* [Node JS 14+](https://nodejs.org/)
* [NPM](https://www.npmjs.com/get-npm)
* [Cloudinary](https://cloudinary.com/)

- [Node JS 14+](https://nodejs.org/)
- [NPM](https://www.npmjs.com/get-npm)
- [Cloudinary](https://cloudinary.com/)

## Run Locally 🤠

1. Clone the respository locally

```
git clone https://github.com/Mridul2820/git-o-get.git
```

2. Create a `.env` file in the root directory

```
GITHUB_TOKEN = <YOUR_GITHUB_TOKEN>
SITE_URL = <YOUR_URL_FOR_APP>
CLOUD_NAME = <YOUR_CLOUDINARY_CLOUD_NAME>
BASE_IMAGE_URL = <URL_FOR_BASE_IMAGE>
```
- **```GITHUB_TOKEN```: Get your `Personal Access Token` by signing in to your github account and then go to your setting -> developer setting -> Personal access tokens -> Generate new token**
- **```SITE_URL```: Your base URL for the app**
- **```CLOUD_NAME```: Create a [Cloudinary](https://cloudinary.com/users/register/free) account and Get your ```CLOUD NAME```**
- **```BASE_IMAGE_URL```: Upload [Base Image](https://github.com/Mridul2820/git-o-get/blob/main/public/assets/github-social.jpg) in Your Cloudinary Cloud and Get the public Id**

- **`GITHUB_TOKEN`: Get your `Personal Access Token` by signing in to your github account and then go to your setting -> developer setting -> Personal access tokens -> Generate new token**
- **`SITE_URL`: Your base URL for the app**
- **`CLOUD_NAME`: Create a [Cloudinary](https://cloudinary.com/users/register/free) account and Get your `CLOUD NAME`**
- **`BASE_IMAGE_URL`: Upload [Base Image](https://github.com/Mridul2820/git-o-get/blob/main/public/assets/github-social.jpg) in Your Cloudinary Cloud and Get the public Id**

3. Install the `node_modules`

```
npm install
```

4. Start the Server

```
npm run dev
```

## How to contribute? 💻

<a href="CONTRIBUTING.md">Contributing Guide</a>

## All the best! 🥇
58 changes: 29 additions & 29 deletions client.js
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
import { ApolloClient, InMemoryCache, createHttpLink } from "@apollo/client";
import { setContext } from '@apollo/client/link/context';

const { GITHUB_TOKEN } = process.env

// Create the http link
const httpLink = createHttpLink({
uri: 'https://api.github.com/graphql',
});

// Generate and set the header with the auth details
const authLink = setContext((_, { headers }) => {
// get the authentication token from env variables if it exists
const token = GITHUB_TOKEN

// return the headers to the context so httpLink can read them
return {
headers: {
...headers,
authorization: `Bearer ${token}`,
}
}
});

// Generate your client with the authLink and httpLink
export const client = new ApolloClient({
cache: new InMemoryCache(),
link: authLink.concat(httpLink)
});
import { ApolloClient, InMemoryCache, createHttpLink } from '@apollo/client';
import { setContext } from '@apollo/client/link/context';

const { GITHUB_TOKEN } = process.env;

// Create the http link
const httpLink = createHttpLink({
uri: 'https://api.github.com/graphql',
});

// Generate and set the header with the auth details
const authLink = setContext((_, { headers }) => {
// get the authentication token from env variables if it exists
const token = GITHUB_TOKEN;

// return the headers to the context so httpLink can read them
return {
headers: {
...headers,
authorization: `Bearer ${token}`,
},
};
});

// Generate your client with the authLink and httpLink
export const client = new ApolloClient({
cache: new InMemoryCache(),
link: authLink.concat(httpLink),
});
41 changes: 21 additions & 20 deletions components/404/NotFound.js
Original file line number Diff line number Diff line change
@@ -1,23 +1,24 @@
import Link from 'next/link'
import React from 'react'
import { BiArrowBack } from 'react-icons/bi'
import Link from 'next/link';
import React from 'react';
import { BiArrowBack } from 'react-icons/bi';

const NotFound = ({ image, message }) => {
return (
<div className='min-h-[calc(100vh-48px)] h-full w-full flex justify-center items-center flex-col gap-12 p-2 md:p-10 lg:p-20'>
<img
src={`/svg/${image}.svg`}
alt="not found"
className='w-full max-w-[500px]'
/>
<p className='text-center'>{message}</p>
<Link href='/'>
<a className="bg-purple-mid flex justify-center items-center gap-2 text-white px-5 py-2 text-lg rounded-lg">
<BiArrowBack />Back to home
</a>
</Link>
</div>
)
}
return (
<div className="min-h-[calc(100vh-48px)] h-full w-full flex justify-center items-center flex-col gap-12 p-2 md:p-10 lg:p-20">
<img
src={`/svg/${image}.svg`}
alt="not found"
className="w-full max-w-[500px]"
/>
<p className="text-center">{message}</p>
<Link href="/">
<a className="bg-purple-mid flex justify-center items-center gap-2 text-white px-5 py-2 text-lg rounded-lg">
<BiArrowBack />
Back to home
</a>
</Link>
</div>
);
};

export default NotFound
export default NotFound;
59 changes: 30 additions & 29 deletions components/footer/Footer.js
Original file line number Diff line number Diff line change
@@ -1,32 +1,33 @@
import React from 'react'
import React from 'react';

const Footer = () => {
return (
<footer className='p-3 flex justify-center items-center gap-1 flex-col sm:flex-row bg-white'>
<span>
&copy; {new Date().getFullYear()} by
<a
className='ml-1 font-semibold'
href="https://www.mridul.tech/"
target='_blank'
rel='noreferrer'
>
Mridul
</a>
.
</span>
<span>Made with ❤ {'& '}
<a
className='ml-1 font-semibold'
href="https://github.com/Mridul2820/git-o-get"
target='_blank'
rel='noreferrer'
>
{'<Code/>'}
</a>
</span>
</footer>
)
}
return (
<footer className="p-3 flex justify-center items-center gap-1 flex-col sm:flex-row bg-white">
<span>
&copy; {new Date().getFullYear()} by
<a
className="ml-1 font-semibold"
href="https://www.mridul.tech/"
target="_blank"
rel="noreferrer"
>
Mridul
</a>
.
</span>
<span>
Made with ❤ {'& '}
<a
className="ml-1 font-semibold"
href="https://github.com/Mridul2820/git-o-get"
target="_blank"
rel="noreferrer"
>
{'<Code/>'}
</a>
</span>
</footer>
);
};

export default Footer
export default Footer;
Loading

1 comment on commit 9e581fb

@vercel
Copy link

@vercel vercel bot commented on 9e581fb Jun 11, 2022

Choose a reason for hiding this comment

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

Successfully deployed to the following URLs:

git-to-get – ./

git-to-get-git-main-mridul28.vercel.app
git-to-get-mridul28.vercel.app
git-o-get.mridul.tech

Please sign in to comment.