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

feat: Explorer with Allokit #3612

Open
wants to merge 18 commits into
base: main
Choose a base branch
from
Open
3 changes: 3 additions & 0 deletions apps/explorer/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": "next/core-web-vitals"
}
36 changes: 36 additions & 0 deletions apps/explorer/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js
.yarn/install-state.gz

# testing
/coverage

# next.js
/.next/
/out/

# production
/build

# misc
.DS_Store
*.pem

# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# local env files
.env*.local

# vercel
.vercel

# typescript
*.tsbuildinfo
next-env.d.ts
36 changes: 36 additions & 0 deletions apps/explorer/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app).

## Getting Started

First, run the development server:

```bash
npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev
```

Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.

You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file.

This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to automatically optimize and load Inter, a custom Google Font.

## Learn More

To learn more about Next.js, take a look at the following resources:

- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.

You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome!

## Deploy on Vercel

The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.

Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details.
20 changes: 20 additions & 0 deletions apps/explorer/components.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"$schema": "https://ui.shadcn.com/schema.json",
"style": "new-york",
"rsc": true,
"tsx": true,
"tailwind": {
"config": "tailwind.config.ts",
"css": "src/app/globals.css",
"baseColor": "neutral",
"cssVariables": false,
"prefix": ""
},
"aliases": {
"components": "@/components",
"utils": "@/lib/utils",
"ui": "@/components/ui",
"lib": "@/lib",
"hooks": "@/hooks"
}
}
21 changes: 21 additions & 0 deletions apps/explorer/next.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/** @type {import('next').NextConfig} */
const nextConfig = {
images: {
remotePatterns: [
{
protocol: 'https',
hostname: 'placehold.co',
port: '',
pathname: '/**',
},
{
protocol: 'https',
hostname: 'ipfs.io',
port: '',
pathname: '/**',
},
],
},
};

export default nextConfig;
46 changes: 46 additions & 0 deletions apps/explorer/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{
"name": "explorer",
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start",
"lint": "next lint"
},
"dependencies": {
"@allo-team/kit": "^0.1.13",
"@gitcoin/gitcoin-chain-data": "^1.0.40",
"@radix-ui/react-icons": "^1.3.0",
"@radix-ui/react-label": "^2.1.0",
"@radix-ui/react-slot": "^1.1.0",
"@radix-ui/react-tabs": "^1.1.1",
"@rainbow-me/rainbowkit": "2.1.2",
"@tanstack/react-query": "^5.40.0",
"class-variance-authority": "^0.7.0",
"clsx": "^2.1.1",
"date-fns": "^2.29.3",
"framer-motion": "^11.11.4",
"graphql": "^16.8.1",
"graphql-request": "^6.1.0",
"lucide-react": "^0.451.0",
"next": "14.2.5",
"pino-pretty": "^11.3.0",
"react": "^18",
"react-dom": "^18",
"tailwind-merge": "^2.5.3",
"tailwindcss-animate": "^1.0.7",
"viem": "^2.21.26",
"wagmi": "2.10.2"
},
"devDependencies": {
"@types/node": "^20",
"@types/react": "^18",
"@types/react-dom": "^18",
"eslint": "^8",
"eslint-config-next": "14.2.5",
"postcss": "^8",
"tailwindcss": "^3.4.1",
"typescript": "^5"
}
}
8 changes: 8 additions & 0 deletions apps/explorer/postcss.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/** @type {import('postcss-load-config').Config} */
const config = {
plugins: {
tailwindcss: {},
},
};

export default config;
1 change: 1 addition & 0 deletions apps/explorer/public/next.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions apps/explorer/public/vercel.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/explorer/src/app/favicon.ico
Binary file not shown.
88 changes: 88 additions & 0 deletions apps/explorer/src/app/globals.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
@tailwind base;
@tailwind components;
@tailwind utilities;

:root {
--foreground-rgb: 0, 0, 0;
--background-start-rgb: 214, 219, 220;
--background-end-rgb: 255, 255, 255;
}

@media (prefers-color-scheme: dark) {
:root {
--foreground-rgb: 255, 255, 255;
--background-start-rgb: 0, 0, 0;
--background-end-rgb: 0, 0, 0;
}
}

@layer utilities {
.text-balance {
text-wrap: balance;
}
}

@layer base {
:root {
--background: 0 0% 100%;
--foreground: 0 0% 3.9%;
--card: 0 0% 100%;
--card-foreground: 0 0% 3.9%;
--popover: 0 0% 100%;
--popover-foreground: 0 0% 3.9%;
--primary: 0 0% 9%;
--primary-foreground: 0 0% 98%;
--secondary: 0 0% 96.1%;
--secondary-foreground: 0 0% 9%;
--muted: 0 0% 96.1%;
--muted-foreground: 0 0% 45.1%;
--accent: 0 0% 96.1%;
--accent-foreground: 0 0% 9%;
--destructive: 0 84.2% 60.2%;
--destructive-foreground: 0 0% 98%;
--border: 0 0% 89.8%;
--input: 0 0% 89.8%;
--ring: 0 0% 3.9%;
--chart-1: 12 76% 61%;
--chart-2: 173 58% 39%;
--chart-3: 197 37% 24%;
--chart-4: 43 74% 66%;
--chart-5: 27 87% 67%;
--radius: 0.5rem;
}
.dark {
--background: 0 0% 3.9%;
--foreground: 0 0% 98%;
--card: 0 0% 3.9%;
--card-foreground: 0 0% 98%;
--popover: 0 0% 3.9%;
--popover-foreground: 0 0% 98%;
--primary: 0 0% 98%;
--primary-foreground: 0 0% 9%;
--secondary: 0 0% 14.9%;
--secondary-foreground: 0 0% 98%;
--muted: 0 0% 14.9%;
--muted-foreground: 0 0% 63.9%;
--accent: 0 0% 14.9%;
--accent-foreground: 0 0% 98%;
--destructive: 0 62.8% 30.6%;
--destructive-foreground: 0 0% 98%;
--border: 0 0% 14.9%;
--input: 0 0% 14.9%;
--ring: 0 0% 83.1%;
--chart-1: 220 70% 50%;
--chart-2: 160 60% 45%;
--chart-3: 30 80% 55%;
--chart-4: 280 65% 60%;
--chart-5: 340 75% 55%;
}
}

@layer base {
* {
@apply border-border;
}
body {
@apply bg-background text-foreground;
}
}
29 changes: 29 additions & 0 deletions apps/explorer/src/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import type { Metadata } from "next";
import { Inter } from "next/font/google";
import "./globals.css";
import { Web3Provider } from "@/kit/features/common/Providers";
import Header from "@/kit/features/common/Header";

const inter = Inter({ subsets: ["latin"] });

export const metadata: Metadata = {
title: "Gitcoin Grants Explorer",
description: "",
};

export default function RootLayout({
children,
}: Readonly<{
children: React.ReactNode;
}>) {
return (
<html lang="en">
<body className={inter.className}>
<Web3Provider>
<Header />
<main className="">{children}</main>
</Web3Provider>
</body>
</html>
);
}
11 changes: 11 additions & 0 deletions apps/explorer/src/app/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import Hero from "@/components/landingpage/Hero";
import HomeNav from "@/components/landingpage/HomeNav";

export default function Home() {
return (
<main className="items-center justify-between min-h-screen ">
<Hero />
<HomeNav />
</main>
);
}
14 changes: 14 additions & 0 deletions apps/explorer/src/app/project/[chainId]/[projectId]/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import React from "react";
import ProjectHero from "@/kit/features/project/components/ProjectHero";

export default function ProjectPage({
params,
}: {
params: { projectId: string; chainId: string };
}) {
return (
<main className="flex flex-col items-center justify-between min-h-screen ">
<ProjectHero projectId={params.projectId} chainId={params.chainId} />
</main>
);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { NextRequest } from "next/server";

function GET(request: NextRequest) {
//
}
14 changes: 14 additions & 0 deletions apps/explorer/src/app/round/[chainId]/[roundId]/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import React from "react";
import RoundHero from "@/kit/features/rounds/components/RoundHero";

export default function RoundPage({
params,
}: {
params: { chainId: string; roundId: string };
}) {
return (
<main className="flex flex-col items-center justify-between min-h-screen ">
<RoundHero chainId={params.chainId} roundId={params.roundId} />
</main>
);
}
40 changes: 40 additions & 0 deletions apps/explorer/src/components/landingpage/Hero.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
"use client";

import React from "react";
import { motion } from "framer-motion";
import StatsCard from "./StatsCard";

export default function Hero() {
return (
<section className="w-full py-12 bg-gradient-to-br from-primary/10 via-background to-secondary/10">
<div className="container px-4 md:px-6">
<div className="grid grid-cols-1 gap-6 md:grid-cols-2 lg:gap-12 ">
<motion.div
className="flex items-center justify-center"
initial={{ opacity: 0.1, y: 20 }}
animate={{ opacity: 1, y: 0 }}
transition={{ duration: 0.6, delay: 0.2 }}
>
<StatsCard />
</motion.div>
<motion.div
className="flex flex-col justify-center space-y-4"
initial={{ opacity: 0.1, y: 20 }}
animate={{ opacity: 1, y: 0 }}
transition={{ duration: 0.6 }}
>
<h1 className="text-3xl font-bold tracking-tighter sm:text-5xl xl:text-6xl/none">
Fund What Matters
</h1>
<h1 className="text-3xl font-bold tracking-tighter sm:text-5xl xl:text-6xl/none">
Fund What Matters
</h1>
<h1 className="text-3xl font-bold tracking-tighter sm:text-5xl xl:text-6xl/none">
Fund What Matters
</h1>
</motion.div>
</div>
</div>
</section>
);
}
Loading