Skip to content
Merged
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
35 changes: 35 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
NEXT_PUBLIC_STELLAR_NETWORK=testnet

NEXT_PUBLIC_APP_URL=http://localhost:3000

NEXT_PUBLIC_API_URL=https://staging-api.boundlessfi.xyz/api

NEXT_PUBLIC_WALLET_CONNECT_PROJECT_ID=your_wallet_connect_project_id
# Get this from https://cloud.walletconnect.com/

NEXT_PUBLIC_HORIZON_TESTNET_URL=https://horizon-testnet.stellar.org
NEXT_PUBLIC_HORIZON_PUBLIC_URL=https://horizon.stellar.org

NEXT_PUBLIC_APP_NAME=Boundless
NEXT_PUBLIC_APP_DESCRIPTION=Stellar-based application
NEXT_PUBLIC_APP_ICON=/logo.svg

NEXT_PUBLIC_DEBUG_MODE=false

NEXT_PUBLIC_ENABLE_WALLET_CONNECT=true
NEXT_PUBLIC_ENABLE_MULTI_WALLET=true
NEXT_PUBLIC_ENABLE_NETWORK_SWITCHING=true

NEXTAUTH_SECRET=your_nextauth_secret_here

NEXTAUTH_URL=http://localhost:3000

GOOGLE_CLIENT_ID=your_google_client_id

GOOGLE_CLIENT_SECRET=your_google_client_secret

NODE_ENV=development




2 changes: 1 addition & 1 deletion app/auth/signin/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export default function SignInPage() {
const handleGoogleSignIn = async () => {
setIsLoading(true);
try {
await signIn('google', { callbackUrl: '/dashboard' });
await signIn('google', { callbackUrl: '/user' });
} catch {
setError('Failed to sign in with Google');
setIsLoading(false);
Expand Down
4 changes: 2 additions & 2 deletions app/auth/signup/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ export default function SignUpPage() {
</Button>
</form>

<div className='relative'>
<div className='relative hidden'>
<div className='absolute inset-0 flex items-center'>
<Separator className='w-full' />
</div>
Expand All @@ -278,7 +278,7 @@ export default function SignUpPage() {
window.location.href = '/api/auth/signin/google';
}}
disabled={isLoading}
className='w-full'
className='w-full hidden'
>
<svg className='mr-2 h-4 w-4' viewBox='0 0 24 24'>
<path
Expand Down
102 changes: 6 additions & 96 deletions app/page.tsx
Original file line number Diff line number Diff line change
@@ -1,21 +1,14 @@
'use client';
import { PriceDisplay } from '@/components/PriceDisplay';
import EmptyState from '@/components/EmptyState';
import { BoundlessButton } from '@/components/buttons';
import { Coins, History, Plus } from 'lucide-react';
import Card from '@/components/card';
import RecentProjects from '@/components/overview/RecentProjects';
import RecentContributions from '@/components/overview/ReecntContributions';
import GrantHistory from '@/components/overview/GrantHistory';
import { AuthNav } from '@/components/auth/AuthNav';
import { motion } from 'framer-motion';
import {
fadeInUp,
staggerContainer,
slideInFromLeft,
slideInFromRight,
} from '@/lib/motion';
import PageTransition from '@/components/PageTransition';
import Link from 'next/link';

export default function Home() {
return (
Expand All @@ -34,95 +27,12 @@ export default function Home() {
<AuthNav />
</motion.header>
<motion.main
className='flex flex-col gap-[32px] items-center sm:items-start'
variants={staggerContainer}
className='w-full max-w-6xl flex flex-col items-center justify-center'
variants={slideInFromRight}
>
<motion.div
className='bg-[#1C1C1C] rounded-lg p-4 w-full max-w-[550px]'
variants={fadeInUp}
>
<PriceDisplay price={100} className='text-2xl font-bold' />
<EmptyState
title='No comments yet'
description='Start by sharing your first project idea with the Boundless community. Once submitted, your projects will appear here for easy tracking.'
type='default'
action={
<BoundlessButton
variant='default'
size='lg'
icon={<Plus className='w-5 h-5' />}
iconPosition='right'
>
Add comment
</BoundlessButton>
}
/>
</motion.div>
<motion.div className='flex gap-4' variants={staggerContainer}>
<motion.div variants={fadeInUp}>
<Card
title='Active Campaigns'
value='10'
bottomText={
<div className='flex items-center gap-2'>
<Coins className='w-4 h-4 text-white/60' />
<PriceDisplay
price={0}
className='!text-xs !tracking-[-0.06px]'
/>
</div>
}
/>
</motion.div>
<motion.div variants={fadeInUp}>
<Card
title='Pending Submissions'
value='0'
bottomText={
<div className='flex items-center gap-2'>
<History className='w-4 h-4 text-white/60' />
<span className='text-white/60'>No recent submissions</span>
</div>
}
/>
</motion.div>
<motion.div variants={fadeInUp}>
<Card
title='Active Projects'
value='0'
bottomText={
<div className='flex items-center gap-2'>
<span className='text-white/90'>0</span>
Approved Submissions
</div>
}
/>
</motion.div>
<motion.div variants={fadeInUp}>
<Card
title='Available Grants'
value={
<PriceDisplay price={0} className='!tracking-[-0.06px]' />
}
bottomText={
<div className='flex items-center gap-2 text-white/90'>
6 grants available
</div>
}
/>
</motion.div>
</motion.div>
<motion.div variants={fadeInUp}>
<RecentProjects projects={[]} />
</motion.div>
<motion.div className='flex gap-4' variants={staggerContainer}>
<motion.div variants={slideInFromLeft}>
<RecentContributions projects={[]} />
</motion.div>
<motion.div variants={slideInFromRight}>
<GrantHistory projects={[]} />
</motion.div>
</motion.div>
<Link href='/user'>
<BoundlessButton>Go to Dashboard</BoundlessButton>
</Link>
</motion.main>
</motion.div>
</PageTransition>
Expand Down
4 changes: 2 additions & 2 deletions components/auth/AuthNav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export function AuthNav() {
if (!session) {
return (
<div className='flex items-center space-x-2'>
<Button variant='ghost' onClick={() => signIn()}>
<Button variant='outline' onClick={() => signIn()}>
Sign In
</Button>
<Button asChild>
Expand Down Expand Up @@ -73,7 +73,7 @@ export function AuthNav() {
</DropdownMenuLabel>
<DropdownMenuSeparator />
<DropdownMenuItem asChild>
<Link href='/dashboard' className='flex items-center'>
<Link href='/user' className='flex items-center'>
<User className='mr-2 h-4 w-4' />
Dashboard
</Link>
Expand Down
25 changes: 25 additions & 0 deletions components/connect-wallet/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ import { ScrollArea } from '../ui/scroll-area';
import { Button } from '../ui/button';
import { useWalletStore } from '@/hooks/use-wallet';
import { toast } from 'sonner';
import { TooltipContent, TooltipProvider } from '@radix-ui/react-tooltip';
import { Tooltip, TooltipTrigger } from '../ui/tooltip';

const ConnectWallet = ({
open,
Expand Down Expand Up @@ -214,6 +216,29 @@ const ConnectWallet = ({
Connect Wallet
</DialogTitle>
<CircleQuestionMark className='w-4 h-4 text-[#484848]' />
<TooltipProvider>
<Tooltip>
<TooltipTrigger>
<CircleQuestionMark className='w-4 h-4 text-[#484848]' />
</TooltipTrigger>
<TooltipContent>
<h4 className='text-white text-lg font-medium'>
What is a Wallet?
</h4>
<p className='text-[#B5B5B5] text-sm'>
Wallets are used to send, receive, and store the keys you
use to sign blockchain transactions.
</p>
<h4 className='text-white text-lg font-medium'>
What is a Stellar Blockchain?
</h4>
<p className='text-[#B5B5B5] text-sm'>
Stellar is a decentralized network that allows you to send
and receive digital assets.
</p>
</TooltipContent>
</Tooltip>
</TooltipProvider>
</div>
<Button
variant='ghost'
Expand Down
25 changes: 24 additions & 1 deletion env.example
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ NEXT_PUBLIC_STELLAR_NETWORK=testnet
NEXT_PUBLIC_APP_URL=http://localhost:3000
# Your application's public URL

# API Configuration
NEXT_PUBLIC_API_URL=http://localhost:8000/api
# Your backend API URL

# WalletConnect Configuration
NEXT_PUBLIC_WALLET_CONNECT_PROJECT_ID=your_wallet_connect_project_id
# Get this from https://cloud.walletconnect.com/
Expand All @@ -26,4 +30,23 @@ NEXT_PUBLIC_DEBUG_MODE=false
# Feature Flags
NEXT_PUBLIC_ENABLE_WALLET_CONNECT=true
NEXT_PUBLIC_ENABLE_MULTI_WALLET=true
NEXT_PUBLIC_ENABLE_NETWORK_SWITCHING=true
NEXT_PUBLIC_ENABLE_NETWORK_SWITCHING=true

# NextAuth Configuration
NEXTAUTH_SECRET=your_nextauth_secret_here
# Generate a random string for this secret
# You can use: openssl rand -base64 32

NEXTAUTH_URL=http://localhost:3000
# Your application's public URL (same as NEXT_PUBLIC_APP_URL)

# Google OAuth Configuration
GOOGLE_CLIENT_ID=your_google_client_id
# Get this from Google Cloud Console

GOOGLE_CLIENT_SECRET=your_google_client_secret
# Get this from Google Cloud Console

# Environment
NODE_ENV=development
# Options: development, production, test
6 changes: 2 additions & 4 deletions lib/api/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,9 @@ import axios, { AxiosInstance, AxiosRequestConfig, AxiosResponse } from 'axios';
import Cookies from 'js-cookie';
import { useAuthStore } from '@/lib/stores/auth-store';

const API_BASE_URL = process.env.NEXT_PUBLIC_API_BASE_URL;
const API_BASE_URL = process.env.NEXT_PUBLIC_API_URL;
if (!API_BASE_URL) {
throw new Error(
'NEXT_PUBLIC_API_BASE_URL environment variable is not defined'
);
throw new Error('NEXT_PUBLIC_API_URL environment variable is not defined');
}

export interface ApiResponse<T = unknown> {
Expand Down
2 changes: 1 addition & 1 deletion middleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export function middleware(request: NextRequest) {

// Redirect authenticated users away from auth routes
if (isAuthRoute && isAuthenticated) {
return NextResponse.redirect(new URL('/dashboard', request.url));
return NextResponse.redirect(new URL('/user', request.url));
}

// Redirect unauthenticated users to signin for protected routes
Expand Down
Loading