├── .eslintrc.json ├── public ├── create.png └── dashboard.png ├── src ├── app │ ├── favicon.ico │ ├── users │ │ └── page.tsx │ ├── fonts │ │ ├── GeistVF.woff │ │ └── GeistMonoVF.woff │ ├── api │ │ ├── tokens │ │ │ ├── total-number │ │ │ │ └── route.ts │ │ │ ├── my-tokens │ │ │ │ ├── total-number │ │ │ │ │ └── route.ts │ │ │ │ └── route.ts │ │ │ └── route.ts │ │ ├── auth │ │ │ ├── validate-token │ │ │ │ └── route.ts │ │ │ ├── register │ │ │ │ └── route.ts │ │ │ ├── login │ │ │ │ └── route.ts │ │ │ └── change-password │ │ │ │ └── route.ts │ │ ├── file │ │ │ └── route.ts │ │ └── users │ │ │ └── route.ts │ ├── layout.tsx │ ├── globals.css │ ├── page.tsx │ ├── tokens │ │ └── page.tsx │ ├── profile │ │ └── page.tsx │ ├── auth │ │ ├── signin │ │ │ └── page.tsx │ │ └── register │ │ │ └── page.tsx │ ├── change │ │ └── page.tsx │ └── create │ │ └── page.tsx ├── lib │ └── utils.ts ├── utils │ ├── web3.ts │ ├── jwt.ts │ ├── supabase │ │ ├── server.ts │ │ └── middleware.ts │ └── api.ts ├── components │ ├── ui │ │ ├── textarea.tsx │ │ ├── label.tsx │ │ ├── input.tsx │ │ ├── switch.tsx │ │ ├── checkbox.tsx │ │ ├── card.tsx │ │ ├── button.tsx │ │ ├── table.tsx │ │ ├── pagination.tsx │ │ ├── dialog.tsx │ │ ├── select.tsx │ │ └── menubar.tsx │ ├── navbar │ │ └── navbar.tsx │ └── table │ │ └── Table.tsx ├── context │ └── global-context.tsx └── assets │ └── image │ └── logo-sixcool.svg ├── postcss.config.mjs ├── next.config.mjs ├── components.json ├── .gitignore ├── tsconfig.json ├── README.md ├── package.json └── tailwind.config.ts /.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": ["next/core-web-vitals", "next/typescript"] 3 | } 4 | -------------------------------------------------------------------------------- /public/create.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sm4rtdev/solana_tokenmint_service/HEAD/public/create.png -------------------------------------------------------------------------------- /src/app/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sm4rtdev/solana_tokenmint_service/HEAD/src/app/favicon.ico -------------------------------------------------------------------------------- /public/dashboard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sm4rtdev/solana_tokenmint_service/HEAD/public/dashboard.png -------------------------------------------------------------------------------- /src/app/users/page.tsx: -------------------------------------------------------------------------------- 1 | 2 | export default function Users() { 3 | return
Hi, this is users page
4 | } -------------------------------------------------------------------------------- /src/app/fonts/GeistVF.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sm4rtdev/solana_tokenmint_service/HEAD/src/app/fonts/GeistVF.woff -------------------------------------------------------------------------------- /src/app/fonts/GeistMonoVF.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sm4rtdev/solana_tokenmint_service/HEAD/src/app/fonts/GeistMonoVF.woff -------------------------------------------------------------------------------- /postcss.config.mjs: -------------------------------------------------------------------------------- 1 | /** @type {import('postcss-load-config').Config} */ 2 | const config = { 3 | plugins: { 4 | tailwindcss: {}, 5 | }, 6 | }; 7 | 8 | export default config; 9 | -------------------------------------------------------------------------------- /src/lib/utils.ts: -------------------------------------------------------------------------------- 1 | import { clsx, type ClassValue } from "clsx" 2 | import { twMerge } from "tailwind-merge" 3 | 4 | export function cn(...inputs: ClassValue[]) { 5 | return twMerge(clsx(inputs)) 6 | } 7 | -------------------------------------------------------------------------------- /next.config.mjs: -------------------------------------------------------------------------------- 1 | /** @type {import('next').NextConfig} */ 2 | const nextConfig = { 3 | eslint: { 4 | ignoreDuringBuilds: true 5 | }, 6 | reactStrictMode: false 7 | }; 8 | 9 | export default nextConfig; 10 | -------------------------------------------------------------------------------- /components.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://ui.shadcn.com/schema.json", 3 | "style": "default", 4 | "rsc": true, 5 | "tsx": true, 6 | "tailwind": { 7 | "config": "tailwind.config.ts", 8 | "css": "src/app/globals.css", 9 | "baseColor": "neutral", 10 | "cssVariables": true, 11 | "prefix": "" 12 | }, 13 | "aliases": { 14 | "components": "@/components", 15 | "utils": "@/lib/utils", 16 | "ui": "@/components/ui", 17 | "lib": "@/lib", 18 | "hooks": "@/hooks" 19 | }, 20 | "iconLibrary": "lucide" 21 | } -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | .yarn/install-state.gz 8 | 9 | # testing 10 | /coverage 11 | 12 | # next.js 13 | /.next/ 14 | /out/ 15 | 16 | # production 17 | /build 18 | 19 | # misc 20 | .DS_Store 21 | *.pem 22 | 23 | # debug 24 | npm-debug.log* 25 | yarn-debug.log* 26 | yarn-error.log* 27 | 28 | # local env files 29 | .env*.local 30 | 31 | # vercel 32 | .vercel 33 | 34 | # typescript 35 | *.tsbuildinfo 36 | next-env.d.ts 37 | -------------------------------------------------------------------------------- /src/app/api/tokens/total-number/route.ts: -------------------------------------------------------------------------------- 1 | 2 | 3 | import { createClient } from "@/utils/supabase/server"; 4 | 5 | export async function GET(req: Request) { 6 | const supabase = await createClient(); 7 | const url = new URL(req.url); 8 | const net = url.searchParams.get("devnet"); 9 | const { count: totalCount, error } = (await supabase.from("tokens" + (net !== null ? "_devnet" : "")).select('*', { count: 'exact'})) 10 | return new Response(JSON.stringify(totalCount), { 11 | status: error ? 500 : 200, 12 | headers: { 13 | 'Content-Type': 'application/json', 14 | }, 15 | }); 16 | 17 | } -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "lib": ["dom", "dom.iterable", "esnext"], 4 | "allowJs": true, 5 | "skipLibCheck": true, 6 | "strict": true, 7 | "noEmit": true, 8 | "esModuleInterop": true, 9 | "module": "esnext", 10 | "moduleResolution": "bundler", 11 | "resolveJsonModule": true, 12 | "isolatedModules": true, 13 | "jsx": "preserve", 14 | "incremental": true, 15 | "plugins": [ 16 | { 17 | "name": "next" 18 | } 19 | ], 20 | "paths": { 21 | "@/*": ["./src/*"] 22 | } 23 | }, 24 | "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"], 25 | "exclude": ["node_modules"] 26 | } 27 | -------------------------------------------------------------------------------- /src/utils/web3.ts: -------------------------------------------------------------------------------- 1 | import { PublicKey } from "@solana/web3.js"; 2 | 3 | export const getSolanaProvider = () => { 4 | if ('phantom' in window) { 5 | const provider = (window as any).phantom?.solana; 6 | 7 | if (provider?.isPhantom) { 8 | return provider; 9 | } 10 | } 11 | return null; 12 | } 13 | 14 | export const connectSolana = async () : Promise => { 15 | const provider = getSolanaProvider(); 16 | try { 17 | const { publicKey } = await provider.connect(); 18 | console.log("Wallet connected", publicKey.toString()) 19 | return publicKey; 20 | } catch (e) { 21 | console.log("User rejected the request!", e) 22 | return null; 23 | } 24 | } -------------------------------------------------------------------------------- /src/components/ui/textarea.tsx: -------------------------------------------------------------------------------- 1 | import * as React from "react" 2 | 3 | import { cn } from "@/lib/utils" 4 | 5 | const Textarea = React.forwardRef< 6 | HTMLTextAreaElement, 7 | React.ComponentProps<"textarea"> 8 | >(({ className, ...props }, ref) => { 9 | return ( 10 |