diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..5ef6a52 --- /dev/null +++ b/.gitignore @@ -0,0 +1,41 @@ +# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. + +# dependencies +/node_modules +/.pnp +.pnp.* +.yarn/* +!.yarn/patches +!.yarn/plugins +!.yarn/releases +!.yarn/versions + +# testing +/coverage + +# next.js +/.next/ +/out/ + +# production +/build + +# misc +.DS_Store +*.pem + +# debug +npm-debug.log* +yarn-debug.log* +yarn-error.log* +.pnpm-debug.log* + +# env files (can opt-in for committing if needed) +.env* + +# vercel +.vercel + +# typescript +*.tsbuildinfo +next-env.d.ts diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 0000000..8bd0e39 --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,5 @@ + +# This is NOT the Next.js you know + +This version has breaking changes — APIs, conventions, and file structure may all differ from your training data. Read the relevant guide in `node_modules/next/dist/docs/` before writing any code. Heed deprecation notices. + diff --git a/CLAUDE.md b/CLAUDE.md new file mode 100644 index 0000000..43c994c --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1 @@ +@AGENTS.md diff --git a/README.backup.md b/README.backup.md new file mode 100644 index 0000000..728695f --- /dev/null +++ b/README.backup.md @@ -0,0 +1,92 @@ +# download + + + +## Getting started + +To make it easy for you to get started with GitLab, here's a list of recommended next steps. + +Already a pro? Just edit this README.md and make it your own. Want to make it easy? [Use the template at the bottom](#editing-this-readme)! + +## Add your files + +- [ ] [Create](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#create-a-file) or [upload](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#upload-a-file) files +- [ ] [Add files using the command line](https://docs.gitlab.com/ee/gitlab-basics/add-file.html#add-a-file-using-the-command-line) or push an existing Git repository with the following command: + +``` +cd existing_repo +git remote add origin http://gitlab.yidooplanet.com/gitlab-instance-0a899031/download.git +git branch -M main +git push -uf origin main +``` + +## Integrate with your tools + +- [ ] [Set up project integrations](http://gitlab.yidooplanet.com/gitlab-instance-0a899031/download/-/settings/integrations) + +## Collaborate with your team + +- [ ] [Invite team members and collaborators](https://docs.gitlab.com/ee/user/project/members/) +- [ ] [Create a new merge request](https://docs.gitlab.com/ee/user/project/merge_requests/creating_merge_requests.html) +- [ ] [Automatically close issues from merge requests](https://docs.gitlab.com/ee/user/project/issues/managing_issues.html#closing-issues-automatically) +- [ ] [Enable merge request approvals](https://docs.gitlab.com/ee/user/project/merge_requests/approvals/) +- [ ] [Automatically merge when pipeline succeeds](https://docs.gitlab.com/ee/user/project/merge_requests/merge_when_pipeline_succeeds.html) + +## Test and Deploy + +Use the built-in continuous integration in GitLab. + +- [ ] [Get started with GitLab CI/CD](https://docs.gitlab.com/ee/ci/quick_start/index.html) +- [ ] [Analyze your code for known vulnerabilities with Static Application Security Testing(SAST)](https://docs.gitlab.com/ee/user/application_security/sast/) +- [ ] [Deploy to Kubernetes, Amazon EC2, or Amazon ECS using Auto Deploy](https://docs.gitlab.com/ee/topics/autodevops/requirements.html) +- [ ] [Use pull-based deployments for improved Kubernetes management](https://docs.gitlab.com/ee/user/clusters/agent/) +- [ ] [Set up protected environments](https://docs.gitlab.com/ee/ci/environments/protected_environments.html) + +*** + +# Editing this README + +When you're ready to make this README your own, just edit this file and use the handy template below (or feel free to structure it however you want - this is just a starting point!). Thank you to [makeareadme.com](https://www.makeareadme.com/) for this template. + +## Suggestions for a good README +Every project is different, so consider which of these sections apply to yours. The sections used in the template are suggestions for most open source projects. Also keep in mind that while a README can be too long and detailed, too long is better than too short. If you think your README is too long, consider utilizing another form of documentation rather than cutting out information. + +## Name +Choose a self-explaining name for your project. + +## Description +Let people know what your project can do specifically. Provide context and add a link to any reference visitors might be unfamiliar with. A list of Features or a Background subsection can also be added here. If there are alternatives to your project, this is a good place to list differentiating factors. + +## Badges +On some READMEs, you may see small images that convey metadata, such as whether or not all the tests are passing for the project. You can use Shields to add some to your README. Many services also have instructions for adding a badge. + +## Visuals +Depending on what you are making, it can be a good idea to include screenshots or even a video (you'll frequently see GIFs rather than actual videos). Tools like ttygif can help, but check out Asciinema for a more sophisticated method. + +## Installation +Within a particular ecosystem, there may be a common way of installing things, such as using Yarn, NuGet, or Homebrew. However, consider the possibility that whoever is reading your README is a novice and would like more guidance. Listing specific steps helps remove ambiguity and gets people to using your project as quickly as possible. If it only runs in a specific context like a particular programming language version or operating system or has dependencies that have to be installed manually, also add a Requirements subsection. + +## Usage +Use examples liberally, and show the expected output if you can. It's helpful to have inline the smallest example of usage that you can demonstrate, while providing links to more sophisticated examples if they are too long to reasonably include in the README. + +## Support +Tell people where they can go to for help. It can be any combination of an issue tracker, a chat room, an email address, etc. + +## Roadmap +If you have ideas for releases in the future, it is a good idea to list them in the README. + +## Contributing +State if you are open to contributions and what your requirements are for accepting them. + +For people who want to make changes to your project, it's helpful to have some documentation on how to get started. Perhaps there is a script that they should run or some environment variables that they need to set. Make these steps explicit. These instructions could also be useful to your future self. + +You can also document commands to lint the code or run tests. These steps help to ensure high code quality and reduce the likelihood that the changes inadvertently break something. Having instructions for running tests is especially helpful if it requires external setup, such as starting a Selenium server for testing in a browser. + +## Authors and acknowledgment +Show your appreciation to those who have contributed to the project. + +## License +For open source projects, say how it is licensed. + +## Project status +If you have run out of energy or time for your project, put a note at the top of the README saying that development has slowed down or stopped completely. Someone may choose to fork your project or volunteer to step in as a maintainer or owner, allowing your project to keep going. You can also make an explicit request for maintainers. diff --git a/README.md b/README.md index 728695f..e215bc4 100644 --- a/README.md +++ b/README.md @@ -1,92 +1,36 @@ -# download +This is a [Next.js](https://nextjs.org) project bootstrapped with [`create-next-app`](https://nextjs.org/docs/app/api-reference/cli/create-next-app). +## Getting Started +First, run the development server: -## Getting started - -To make it easy for you to get started with GitLab, here's a list of recommended next steps. - -Already a pro? Just edit this README.md and make it your own. Want to make it easy? [Use the template at the bottom](#editing-this-readme)! - -## Add your files - -- [ ] [Create](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#create-a-file) or [upload](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#upload-a-file) files -- [ ] [Add files using the command line](https://docs.gitlab.com/ee/gitlab-basics/add-file.html#add-a-file-using-the-command-line) or push an existing Git repository with the following command: - -``` -cd existing_repo -git remote add origin http://gitlab.yidooplanet.com/gitlab-instance-0a899031/download.git -git branch -M main -git push -uf origin main +```bash +npm run dev +# or +yarn dev +# or +pnpm dev +# or +bun dev ``` -## Integrate with your tools +Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. -- [ ] [Set up project integrations](http://gitlab.yidooplanet.com/gitlab-instance-0a899031/download/-/settings/integrations) +You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file. -## Collaborate with your team +This project uses [`next/font`](https://nextjs.org/docs/app/building-your-application/optimizing/fonts) to automatically optimize and load [Geist](https://vercel.com/font), a new font family for Vercel. -- [ ] [Invite team members and collaborators](https://docs.gitlab.com/ee/user/project/members/) -- [ ] [Create a new merge request](https://docs.gitlab.com/ee/user/project/merge_requests/creating_merge_requests.html) -- [ ] [Automatically close issues from merge requests](https://docs.gitlab.com/ee/user/project/issues/managing_issues.html#closing-issues-automatically) -- [ ] [Enable merge request approvals](https://docs.gitlab.com/ee/user/project/merge_requests/approvals/) -- [ ] [Automatically merge when pipeline succeeds](https://docs.gitlab.com/ee/user/project/merge_requests/merge_when_pipeline_succeeds.html) +## Learn More -## Test and Deploy +To learn more about Next.js, take a look at the following resources: -Use the built-in continuous integration in GitLab. +- [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. -- [ ] [Get started with GitLab CI/CD](https://docs.gitlab.com/ee/ci/quick_start/index.html) -- [ ] [Analyze your code for known vulnerabilities with Static Application Security Testing(SAST)](https://docs.gitlab.com/ee/user/application_security/sast/) -- [ ] [Deploy to Kubernetes, Amazon EC2, or Amazon ECS using Auto Deploy](https://docs.gitlab.com/ee/topics/autodevops/requirements.html) -- [ ] [Use pull-based deployments for improved Kubernetes management](https://docs.gitlab.com/ee/user/clusters/agent/) -- [ ] [Set up protected environments](https://docs.gitlab.com/ee/ci/environments/protected_environments.html) +You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js) - your feedback and contributions are welcome! -*** +## Deploy on Vercel -# Editing this README +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. -When you're ready to make this README your own, just edit this file and use the handy template below (or feel free to structure it however you want - this is just a starting point!). Thank you to [makeareadme.com](https://www.makeareadme.com/) for this template. - -## Suggestions for a good README -Every project is different, so consider which of these sections apply to yours. The sections used in the template are suggestions for most open source projects. Also keep in mind that while a README can be too long and detailed, too long is better than too short. If you think your README is too long, consider utilizing another form of documentation rather than cutting out information. - -## Name -Choose a self-explaining name for your project. - -## Description -Let people know what your project can do specifically. Provide context and add a link to any reference visitors might be unfamiliar with. A list of Features or a Background subsection can also be added here. If there are alternatives to your project, this is a good place to list differentiating factors. - -## Badges -On some READMEs, you may see small images that convey metadata, such as whether or not all the tests are passing for the project. You can use Shields to add some to your README. Many services also have instructions for adding a badge. - -## Visuals -Depending on what you are making, it can be a good idea to include screenshots or even a video (you'll frequently see GIFs rather than actual videos). Tools like ttygif can help, but check out Asciinema for a more sophisticated method. - -## Installation -Within a particular ecosystem, there may be a common way of installing things, such as using Yarn, NuGet, or Homebrew. However, consider the possibility that whoever is reading your README is a novice and would like more guidance. Listing specific steps helps remove ambiguity and gets people to using your project as quickly as possible. If it only runs in a specific context like a particular programming language version or operating system or has dependencies that have to be installed manually, also add a Requirements subsection. - -## Usage -Use examples liberally, and show the expected output if you can. It's helpful to have inline the smallest example of usage that you can demonstrate, while providing links to more sophisticated examples if they are too long to reasonably include in the README. - -## Support -Tell people where they can go to for help. It can be any combination of an issue tracker, a chat room, an email address, etc. - -## Roadmap -If you have ideas for releases in the future, it is a good idea to list them in the README. - -## Contributing -State if you are open to contributions and what your requirements are for accepting them. - -For people who want to make changes to your project, it's helpful to have some documentation on how to get started. Perhaps there is a script that they should run or some environment variables that they need to set. Make these steps explicit. These instructions could also be useful to your future self. - -You can also document commands to lint the code or run tests. These steps help to ensure high code quality and reduce the likelihood that the changes inadvertently break something. Having instructions for running tests is especially helpful if it requires external setup, such as starting a Selenium server for testing in a browser. - -## Authors and acknowledgment -Show your appreciation to those who have contributed to the project. - -## License -For open source projects, say how it is licensed. - -## Project status -If you have run out of energy or time for your project, put a note at the top of the README saying that development has slowed down or stopped completely. Someone may choose to fork your project or volunteer to step in as a maintainer or owner, allowing your project to keep going. You can also make an explicit request for maintainers. +Check out our [Next.js deployment documentation](https://nextjs.org/docs/app/building-your-application/deploying) for more details. diff --git a/app/apps/[slug]/page.tsx b/app/apps/[slug]/page.tsx new file mode 100644 index 0000000..280bbc5 --- /dev/null +++ b/app/apps/[slug]/page.tsx @@ -0,0 +1,77 @@ +import { notFound } from "next/navigation"; +import { AppMetaInfo, ChangelogTimeline, DownloadButtons, QRCodeSection, VersionHistory } from "@/components/app-detail"; +import { AppGrid, UnlockSection } from "@/components/sections"; +import { ScrollReveal } from "@/components/scroll-reveal"; +import { DetailScrollShowcase } from "@/components/detail-scroll-showcase"; +import { getAppBySlug, getApps } from "@/services/apps.service"; +import { ScreenshotGallery } from "@/components/screenshot-gallery"; +import { AccessGate } from "@/components/access-gate"; + +export default async function AppDetailPage({ params }: { params: Promise<{ slug: string }> }) { + const { slug } = await params; + const app = await getAppBySlug(slug); + if (!app) return notFound(); + + const appResources = await getApps(); + const related = appResources.filter((i) => i.slug !== slug).slice(0, 3); + return ( +
+ +
+
+
+
{app.icon}
+
+

{app.name}

+

{app.subtitle}

+
+
+
+ {app.tags.map((t) => {t})} +
+
+
+ + + + + + + + + + + + + + + + + +
+

软件介绍

+

{app.description}

+

使用说明

+
    + {app.usage.map((u) =>
  • {u}
  • )} +
+
+
+ + + + + + + + + + +
+

相关推荐

+ +
+
+
+ ); +} diff --git a/app/apps/page.tsx b/app/apps/page.tsx new file mode 100644 index 0000000..7eeef1f --- /dev/null +++ b/app/apps/page.tsx @@ -0,0 +1,13 @@ +import { AppsExplorer } from "@/components/apps-explorer"; +import { getApps } from "@/services/apps.service"; + +export default async function AppsPage() { + const apps = await getApps(); + return ( +
+

资源列表

+

支持搜索、分类筛选、排序与加载更多(本地 mock 过滤)。

+ +
+ ); +} diff --git a/app/checkout/page.tsx b/app/checkout/page.tsx new file mode 100644 index 0000000..8d86032 --- /dev/null +++ b/app/checkout/page.tsx @@ -0,0 +1,43 @@ +import Link from "next/link"; +import { createCheckoutOrder } from "@/services/order.service"; + +export default async function CheckoutPage({ + searchParams, +}: { + searchParams: Promise<{ plan?: string; slug?: string }>; +}) { + const { plan: rawPlan = "pro", slug = "unknown-app" } = await searchParams; + const plan = rawPlan === "free" || rawPlan === "pro" || rawPlan === "ultra" ? rawPlan : "pro"; + const order = await createCheckoutOrder(plan, slug); + + return ( +
+
+

支付确认(占位)

+

订单确认

+

计划:{order.plan.toUpperCase()} · 资源:{order.slug}

+
+ +
+
+

订单号:{order.id}

+

支付金额:¥{order.amount}

+

支付方式:PayJS(预留)

+

后续可接支付二维码、轮询支付状态与回调签名校验。

+
+
+
+ 支付二维码占位 +
+
+
+ +
+ + 我已支付,查看订单状态 + + 返回套餐页 +
+
+ ); +} diff --git a/app/favicon.ico b/app/favicon.ico new file mode 100644 index 0000000..718d6fe Binary files /dev/null and b/app/favicon.ico differ diff --git a/app/globals.css b/app/globals.css new file mode 100644 index 0000000..29c98d3 --- /dev/null +++ b/app/globals.css @@ -0,0 +1,92 @@ +@import "tailwindcss"; + +:root { + --background: #050816; + --foreground: #e6edf8; + --card: rgba(15, 23, 42, 0.56); + --card-border: rgba(148, 163, 184, 0.24); + --ring: rgba(56, 189, 248, 0.45); +} + +@theme inline { + --color-background: var(--background); + --color-foreground: var(--foreground); + --font-sans: var(--font-geist-sans); + --font-mono: var(--font-geist-mono); +} + +@media (prefers-color-scheme: dark) { + :root { + --background: #020617; + --foreground: #e2e8f0; + } +} + +html.light { + --background: #f4f7ff; + --foreground: #111827; + --card: rgba(255, 255, 255, 0.74); + --card-border: rgba(148, 163, 184, 0.24); + --ring: rgba(14, 116, 144, 0.28); +} + +body { + background: var(--background); + color: var(--foreground); + font-family: var(--font-geist-sans), Arial, sans-serif; + background-image: + radial-gradient(circle at 10% -10%, rgba(34, 211, 238, 0.18), transparent 35%), + radial-gradient(circle at 90% 0%, rgba(139, 92, 246, 0.2), transparent 36%), + radial-gradient(circle at 50% 100%, rgba(59, 130, 246, 0.1), transparent 45%); +} + +* { + border-color: var(--card-border); +} + +.card-glass { + @apply rounded-xl border p-3 backdrop-blur-xl transition duration-300; + background: var(--card); + border-color: var(--card-border); + box-shadow: 0 20px 55px rgba(2, 8, 23, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.05); +} + +.card-glass:hover { + box-shadow: 0 24px 62px rgba(2, 8, 23, 0.42), 0 0 0 1px rgba(125, 211, 252, 0.16); +} + +.pill { + @apply rounded-full border px-3.5 py-1.5 text-xs font-medium transition; + background: rgba(148, 163, 184, 0.12); + border-color: rgba(148, 163, 184, 0.24); +} + +.pill-active { + @apply text-cyan-100; + background: linear-gradient(135deg, rgba(6, 182, 212, 0.46), rgba(99, 102, 241, 0.42)); + border-color: rgba(125, 211, 252, 0.5); +} + +.cta-main { + @apply rounded-xl px-5 py-2.5 text-sm font-semibold text-slate-900 transition duration-300 hover:-translate-y-0.5; + background: linear-gradient(135deg, #22d3ee, #60a5fa 52%, #a78bfa); + box-shadow: 0 10px 28px rgba(56, 189, 248, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.2) inset; +} + +.cta-sub { + @apply rounded-xl border px-5 py-2.5 text-sm transition duration-300 hover:-translate-y-0.5; + background: rgba(15, 23, 42, 0.35); +} + +.section-title { + @apply text-lg font-semibold tracking-tight md:text-xl; +} + +.input-fancy { + @apply w-full rounded-2xl border bg-slate-950/30 px-4 py-3 text-sm outline-none transition placeholder:text-slate-400; + border-color: rgba(125, 211, 252, 0.2); +} + +.input-fancy:focus { + box-shadow: 0 0 0 4px var(--ring); +} diff --git a/app/insights/page.tsx b/app/insights/page.tsx new file mode 100644 index 0000000..2530766 --- /dev/null +++ b/app/insights/page.tsx @@ -0,0 +1,44 @@ +import { InsightChart } from "@/components/insight-chart"; +import { InsightBarChart, InsightPieChart } from "@/components/insight-extra-charts"; + +const rank = [ + ["Media Spark", 29430], + ["Nova AI Studio", 28810], + ["Pixel Flow", 19840], + ["DevLight Proxy", 11690], +]; + +export default function InsightsPage() { + return ( +
+

数据概览

+

前端 mock 展示未来分析后台能力:趋势、排行、来源、渠道。

+
+

下载趋势图

+ +
+
+
+

分类热度柱状图

+ +
+
+

点击来源占比饼图

+ +
+
+
+
+

热门资源排行

+ {rank.map(([n, v]) => ( +
{n}{v}
+ ))} +
+
+

下载渠道占比

+

官方 39% · 百度网盘 33% · 夸克 21% · 备用线路 7%

+
+
+
+ ); +} diff --git a/app/layout.tsx b/app/layout.tsx new file mode 100644 index 0000000..f22274a --- /dev/null +++ b/app/layout.tsx @@ -0,0 +1,55 @@ +import type { Metadata } from "next"; +import { Geist, Geist_Mono } from "next/font/google"; +import "./globals.css"; +import { ThemeProvider } from "@/components/theme-provider"; +import { Navbar } from "@/components/navbar"; +import { Footer } from "@/components/sections"; +import { AmbientBackground } from "@/components/ambient-background"; +import { OpsPopup } from "@/components/ops-popup"; +import { EventDebugPanel } from "@/components/event-debug-panel"; +import { AuthProvider } from "@/components/auth-provider"; +import { DeveloperFlagsProvider } from "@/components/developer-flags-provider"; + +const geistSans = Geist({ + variable: "--font-geist-sans", + subsets: ["latin"], +}); + +const geistMono = Geist_Mono({ + variable: "--font-geist-mono", + subsets: ["latin"], +}); + +export const metadata: Metadata = { + title: "Download Nova", + description: "高颜值下载站前端(Next.js)", +}; + +export default function RootLayout({ + children, +}: Readonly<{ + children: React.ReactNode; +}>) { + return ( + + + + + + + +
{children}
+