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

Fix/readme update Fixes issue #59 #61

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
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
14 changes: 11 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,23 @@ To run GitGlance locally, follow these steps:
```bash
GITHUB_TOKEN=
```
5. Install dependencies:
5. Paste "https://github.com/" in BASE_URL in .env file created above
```bash
BASE_URL= "https://github.com/"
```
6. Connect to your MONGODB Atlas Server in MONGODB_URI (Example given below):
```bash
MONGODB_URI = mongodb+srv://<USERNAME>:<PASSWORD>@gitglancedb.0jcw2en.mongodb.net/?retryWrites=true&w=majority&appName=GitGlanceDB
```
7. Install dependencies:
```bash
npm install
```
6. Start the development server:
8. Start the development server:
```bash
npm run dev
```
7. Open your browser and visit `http://localhost:3000`
9. Open your browser and visit `http://localhost:3000`



Expand Down
47 changes: 47 additions & 0 deletions app/(home)/contributors.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
export const ContributorsData = [
{
name: "Subhadeep Roy",
github: "https://git.new/Subha",
imageUrl:"https://avatars.githubusercontent.com/u/111780029?v=4",
},
{
name: "Suhani Singh Paliwal",
github: "https://github.com/suhanipaliwal",
imageUrl:"https://avatars.githubusercontent.com/u/161575955?v=4",
},
{
name: "Sanmarg Sandeep Paranjpe",
github: "https://github.com/sanmarg",
imageUrl:"https://avatars.githubusercontent.com/u/50082154?v=4",
},
{
name: "Shrijal Acharya",
github: "https://github.com/shricodev",
imageUrl:"https://avatars.githubusercontent.com/u/76906722?v=4",
},
{
name: "Yujit Yadav",
github: "https://github.com/yujit2003",
imageUrl:"https://avatars.githubusercontent.com/u/97657345?v=4",
},
{
name: "Varda003",
github: "https://github.com/Varda003",
imageUrl:"https://avatars.githubusercontent.com/u/136989588?v=4",
},
{
name: "Pradnya",
github: "https://github.com/PradnyaGaitonde",
imageUrl:"https://avatars.githubusercontent.com/u/116059908?v=4",
},
{
name: "Prathica Shetty M",
github: "https://github.com/PrathicaShettyM",
imageUrl:"https://avatars.githubusercontent.com/u/123286880?v=4",
},
{
name: "Saransh Bangar",
github: "https://github.com/SaranshBangar",
imageUrl:"https://avatars.githubusercontent.com/u/114401238?v=4",
},
];
33 changes: 32 additions & 1 deletion app/(home)/page.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,16 @@ import Link from 'next/link';
import GridContainer from '@/components/GridContainer';
import { unstable_noStore as noStore } from 'next/cache';
import Header from '@/components/Header';
import { ContributorsData } from './contributors';
import Image from 'next/image';

export default async function Home() {
noStore();
let recenetProfiles = [];

try {
await connectDb();
recenetProfiles = await RecentProfiles.find({ }).sort({ updatedAt: 'desc' }).limit(8);
recenetProfiles = await RecentProfiles.find({}).sort({ updatedAt: 'desc' }).limit(8);
} catch (error) {
console.log('An error occurred in Home Page while fetching recent profiles');
}
Expand Down Expand Up @@ -68,6 +70,35 @@ export default async function Home() {
</GridContainer>
</div>
)}

<div className="mb-8 mt-16 text-center">
<h2 className="text-3xl font-bold tracking-tight sm:text-4xl">Meet Our Contributors</h2>
</div>
<div className="mb-10 px-4 md:px-12">
<div className="grid grid-cols-2 max-w-screen-xl mx-auto gap-6 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-6">
{ContributorsData.map((data, index) => (
<a
key={index}
href={data.github}
target="_blank"
className="group rounded-lg p-4 shadow-sm transition-all duration-300"
>
<div className="relative overflow-hidden rounded-lg">
<Image
alt={data.name}
className="h-full w-full object-cover object-center transition-all duration-500 group-hover:scale-110"
src={data.imageUrl}
width={400}
height={400}
/>
</div>
<div className="mt-4 text-center">
<h3 className="text-lg font-semibold">{data.name}</h3>
</div>
</a>
))}
</div>
</div>
</main>
</>
);
Expand Down
2 changes: 1 addition & 1 deletion app/[username]/Charts.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const borderColor = [

const Charts = ({ commitsPerRepo, starsPerRepo, reposPerLanguages, starsPerLanguages }) => {
return (
<GridContainer name="Charts" className={'grid-cols-2 gap-0 gap-y-6 px-2 md:grid-cols-4 md:gap-8 md:px-6'}>
<GridContainer name="Charts" className={'flex flex-row flex-wrap justify-evenly gap-0 gap-y-6 px-2 md:gap-8 md:px-6'}>
<div className="">
<Doughnut
title="Commits per Repo"
Expand Down
2 changes: 1 addition & 1 deletion app/[username]/FollowUp.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const FollowUp = ({ follwoup }) => {
const { issues_by_user, pr_by_user, issues_on_user, pr_on_user, login } = follwoup;

return (
<GridContainer name="Follow Up" className={'grid-cols-2 gap-0 gap-y-6 px-2 md:grid-cols-4 md:gap-8 md:px-6'}>
<GridContainer name="Follow Up" className={'flex flex-row flex-wrap justify-evenly gap-0 gap-y-6 px-2 md:gap-8 md:px-6'}>
<div>
<Doughnut
options={{ plugins: { title: { text: `Issues by ${login}` } } }}
Expand Down
8 changes: 8 additions & 0 deletions next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@ const nextConfig = {
fullUrl: true,
},
},
images: {
remotePatterns: [
{
protocol: 'https',
hostname: '*',
},
],
},
};

export default nextConfig;
Loading