Skip to content
Merged

Prod #33

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
a01c4e6
Merge pull request #22 from MyriadFlow/main
Joshua-Ogbonna Nov 9, 2024
600d90a
Merge pull request #23 from MyriadFlow/main
Joshua-Ogbonna Nov 25, 2024
38c7fb0
Merge pull request #24 from MyriadFlow/main
Joshua-Ogbonna Nov 25, 2024
b2dce8f
Merge pull request #25 from MyriadFlow/main
Joshua-Ogbonna Nov 25, 2024
09f9ec3
Merge pull request #26 from MyriadFlow/main
Joshua-Ogbonna Nov 26, 2024
70d7ba1
Merge pull request #28 from MyriadFlow/main
Joshua-Ogbonna Nov 29, 2024
1adb8d0
chore: work on solana integration
Joshua-Ogbonna Dec 22, 2024
7cd229a
chore: work on studio concise flow
Joshua-Ogbonna Dec 30, 2024
cdd9263
chore: fix build issue
Joshua-Ogbonna Dec 30, 2024
3d3646d
Merge pull request #32 from MyriadFlow/new-flow
Joshua-Ogbonna Dec 30, 2024
0aef815
chore: update docker file
Joshua-Ogbonna Dec 30, 2024
25d1850
chore: update docker file
Joshua-Ogbonna Dec 30, 2024
f39c12f
chore: add npmrc file
Joshua-Ogbonna Dec 30, 2024
7781f1c
chore: update dockerfile
Joshua-Ogbonna Dec 30, 2024
cd51a59
chorE: update files
Joshua-Ogbonna Dec 31, 2024
4ee5620
chore: simplify stuff
Joshua-Ogbonna Dec 31, 2024
1c9cac0
chore:move install to after pnpm global install
Joshua-Ogbonna Dec 31, 2024
b9e6bdb
chore:move install to after pnpm global install
Joshua-Ogbonna Dec 31, 2024
1c42988
chore: remove stuff from dockerfile
Joshua-Ogbonna Dec 31, 2024
37a5ab6
chore: update lock
Joshua-Ogbonna Dec 31, 2024
b45ffb2
chore: remove test impl in congrats page
Joshua-Ogbonna Dec 31, 2024
5c67336
Merge branch 'main' into prod
Joshua-Ogbonna Dec 31, 2024
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
82 changes: 0 additions & 82 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,85 +1,4 @@
{
<<<<<<< HEAD
"name": "studio",
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start",
"lint": "next lint"
},
"dependencies": {
"@google/model-viewer": "^4.0.0",
"@hookform/resolvers": "^3.6.0",
"@metaplex-foundation/js": "^0.20.1",
"@radix-ui/react-checkbox": "^1.0.4",
"@radix-ui/react-dialog": "^1.0.5",
"@radix-ui/react-label": "^2.0.2",
"@radix-ui/react-navigation-menu": "^1.1.4",
"@radix-ui/react-radio-group": "^1.1.3",
"@radix-ui/react-select": "^2.1.2",
"@radix-ui/react-slot": "^1.0.2",
"@react-three/drei": "^9.120.3",
"@react-three/fiber": "^8.17.10",
"@react-three/postprocessing": "^2.15.1",
"@readyplayerme/react-avatar-creator": "^0.5.0",
"@readyplayerme/visage": "^5.1.0",
"@solana/wallet-adapter-base": "^0.9.23",
"@solana/wallet-adapter-react": "^0.15.35",
"@solana/wallet-adapter-react-ui": "^0.9.35",
"@solana/wallet-adapter-wallets": "^0.19.32",
"@solana/web3.js": "^1.98.0",
"@tanstack/react-query": "^5.51.23",
"@uploadthing/react": "^6.6.0",
"@web3modal/wagmi": "^5.0.11",
"axios": "^1.7.9",
"canvas-confetti": "^1.9.3",
"class-variance-authority": "^0.7.0",
"clsx": "^2.1.1",
"form-data": "^4.0.1",
"formidable": "^3.5.2",
"install": "^0.13.0",
"lucide-react": "^0.394.0",
"next": "14.2.4",
"next-auth": "^4.24.10",
"nft.storage": "^7.1.1",
"permissionless": "^0.1.31",
<<<<<<< HEAD
"postprocessing": "^6.36.4",
=======
"postprocessing": "^6.36.5",
>>>>>>> cdd9263 (chore: fix build issue)
"react": "^18",
"react-dom": "^18",
"react-form-repeater": "^0.3.0",
"react-hook-form": "^7.52.0",
"react-toastify": "^10.0.5",
"tailwind-merge": "^2.3.0",
"tailwindcss-animate": "^1.0.7",
"three": "^0.171.0",
"three-mesh-bvh": "^0.5.24",
"uploadthing": "^6.12.0",
"uuid": "^10.0.0",
"viem": "^2.19.4",
"wagmi": "^2.12.5",
"zod": "^3.23.8"
},
"devDependencies": {
"@types/canvas-confetti": "^1.6.4",
"@types/formidable": "^3.4.5",
"@types/node": "^20",
"@types/react": "^18",
"@types/react-dom": "^18",
"@types/three": "^0.152.1",
"@types/uuid": "^10.0.0",
"eslint": "^8",
"eslint-config-next": "14.2.4",
"postcss": "^8",
"tailwindcss": "^3.4.1",
"typescript": "^5"
}
=======
"name": "studio",
"version": "0.1.0",
"private": true,
Expand Down Expand Up @@ -161,5 +80,4 @@
"optionalDependencies": {
"prebuild-install": "^7.1.1"
}
>>>>>>> cd51a59 (chorE: update files)
}
13 changes: 1 addition & 12 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

47 changes: 2 additions & 45 deletions src/app/api/upload/route.ts
Original file line number Diff line number Diff line change
@@ -1,25 +1,3 @@
<<<<<<< HEAD
import { NextResponse } from "next/server";
import { writeFile } from "fs/promises";
import { join } from "path";

// Remove this old config export
// export const config = {
// api: {
// bodyParser: false,
// },
// };

// Add this new config for large file uploads
export const runtime = "nodejs";
export const dynamic = "force-dynamic";
export const maxDuration = 60;

export async function POST(request: Request) {
try {
const formData = await request.formData();
const file = formData.get("file") as File;
=======
import { NextRequest, NextResponse } from "next/server";
import formidable from "formidable";
import fs from "fs";
Expand All @@ -38,22 +16,11 @@ async function POST(req: NextRequest) {
// Convert the request to a NodeJS readable stream
const data = await req.formData();
const file = data.get("file") as File;
>>>>>>> cdd9263 (chore: fix build issue)

if (!file) {
return NextResponse.json({ error: "No file uploaded" }, { status: 400 });
}

<<<<<<< HEAD
const bytes = await file.arrayBuffer();
const buffer = Buffer.from(bytes);

// Upload to Pinata
const formDataForPinata = new FormData();
formDataForPinata.append("file", new Blob([buffer]), file.name);

const pinataRes = await fetch(
=======
// Create a temporary file
const bytes = await file.arrayBuffer();
const buffer = Buffer.from(bytes);
Expand All @@ -68,31 +35,21 @@ async function POST(req: NextRequest) {

// Upload to Pinata
const pinataRes = await axios.post(
>>>>>>> cdd9263 (chore: fix build issue)
"https://api.pinata.cloud/pinning/pinFileToIPFS",
formData,
{
method: "POST",
headers: {
"Content-Type": `multipart/form-data; boundary=${formData.getBoundary()}`,
pinata_api_key: process.env.PINATA_API_KEY!,
pinata_secret_api_key: process.env.PINATA_SECRET_KEY!,
},
body: formDataForPinata,
}
);

<<<<<<< HEAD
if (!pinataRes.ok) {
throw new Error("Failed to upload to Pinata");
}

const data = await pinataRes.json();
return NextResponse.json(data);
=======
// Clean up the temporary file
fs.unlinkSync(tempFilePath);

return NextResponse.json(pinataRes.data);
>>>>>>> cdd9263 (chore: fix build issue)
} catch (error) {
console.error("Upload error:", error);
return NextResponse.json(
Expand Down
Loading
Loading