├── with-nuxt ├── README.md ├── tsconfig.json ├── server │ ├── tsconfig.json │ └── api │ │ └── version.get.ts ├── .env.example ├── .gitignore ├── app │ └── app.vue ├── nuxt.config.ts └── package.json ├── with-analog ├── public │ ├── .gitkeep │ └── favicon.ico ├── src │ ├── vite-env.d.ts │ ├── main.ts │ ├── app │ │ ├── app.component.ts │ │ ├── pages │ │ │ ├── index.server.ts │ │ │ └── index.page.ts │ │ └── app.config.server.ts │ ├── main.server.ts │ └── server │ │ └── routes │ │ └── v1 │ │ └── hello.ts ├── postcss.config.cjs ├── .env.example ├── tailwind.config.ts ├── .vscode │ ├── extensions.json │ └── launch.json ├── .editorconfig ├── tsconfig.app.json ├── index.html └── vite.config.ts ├── with-fastapi ├── app │ ├── __init__.py │ └── api │ │ ├── __init__.py │ │ ├── crud.py │ │ ├── models.py │ │ └── songs.py ├── .gitignore ├── .env.example └── main.py ├── with-golang ├── .gitignore ├── .env.example └── go.mod ├── with-wasp ├── public │ └── .gitkeep ├── .wasproot ├── src │ ├── vite-env.d.ts │ ├── waspLogo.png │ └── queries.ts ├── .waspignore ├── .env.example ├── vite.config.ts ├── migrations │ ├── migration_lock.toml │ └── 20240624054622_test │ │ └── migration.sql ├── package.json └── .gitignore ├── with-django ├── myproject │ ├── __init__.py │ ├── asgi.py │ └── wsgi.py ├── .gitignore ├── .env.example └── requirements.txt ├── with-java-jdbc ├── .mvn │ ├── jvm.config │ └── maven.config ├── .gitignore ├── java_connection_details.png ├── .env.example └── src │ ├── main │ └── java │ │ └── com │ │ └── neon │ │ └── quickstart │ │ └── App.java │ └── test │ └── java │ └── com │ └── neon │ └── quickstart │ └── AppTest.java ├── with-laravel ├── public │ ├── favicon.ico │ ├── robots.txt │ └── index.php ├── resources │ ├── css │ │ └── app.css │ └── js │ │ ├── app.js │ │ └── bootstrap.js ├── database │ └── .gitignore ├── storage │ ├── logs │ │ └── .gitignore │ ├── app │ │ ├── public │ │ │ └── .gitignore │ │ └── .gitignore │ └── framework │ │ ├── sessions │ │ └── .gitignore │ │ ├── testing │ │ └── .gitignore │ │ ├── views │ │ └── .gitignore │ │ ├── cache │ │ ├── data │ │ │ └── .gitignore │ │ └── .gitignore │ │ └── .gitignore ├── bootstrap │ ├── cache │ │ └── .gitignore │ └── providers.php ├── app │ ├── Http │ │ └── Controllers │ │ │ └── Controller.php │ └── Providers │ │ └── AppServiceProvider.php ├── routes │ ├── web.php │ └── console.php ├── README.md ├── tests │ ├── TestCase.php │ ├── Unit │ │ └── ExampleTest.php │ └── Feature │ │ └── ExampleTest.php ├── .gitattributes ├── package.json ├── vite.config.js ├── .editorconfig ├── .gitignore └── artisan ├── with-angular ├── src │ ├── app │ │ ├── app.component.css │ │ ├── app.component.html │ │ ├── app.routes.ts │ │ └── app.config.server.ts │ ├── styles.css │ ├── main.ts │ ├── main.server.ts │ └── index.html ├── public │ └── favicon.ico ├── .env.example ├── .vscode │ └── extensions.json ├── .editorconfig └── tsconfig.spec.json ├── with_reflex ├── with_reflex │ └── __init__.py ├── alembic │ └── README ├── requirements.txt ├── .gitignore ├── assets │ └── favicon.ico ├── .env.example └── rxconfig.py ├── with-prisma ├── .gitignore ├── README.md ├── package.json └── .env.example ├── with-flask ├── .gitignore ├── .env.example └── requirements.txt ├── with-knex ├── .gitignore ├── .prettierrc ├── .env.example └── package.json ├── with-rust-postgres ├── .gitignore ├── .env.example └── Cargo.toml ├── with-sveltekit ├── .npmrc ├── src │ ├── app.css │ ├── routes │ │ ├── +page.svelte │ │ └── +page.server.ts │ ├── postgres.server.ts │ ├── app.d.ts │ └── app.html ├── .env.example ├── postcss.config.js ├── tailwind.config.js ├── .prettierrc ├── vite.config.ts ├── .gitignore └── .prettierignore ├── ai ├── langchain │ ├── react-agent-python │ │ ├── .gitignore │ │ ├── .env.example │ │ └── requirements.txt │ ├── rag-nextjs │ │ ├── .eslintrc.json │ │ ├── .prettierrc │ │ ├── next.config.mjs │ │ ├── postcss.config.mjs │ │ ├── lib │ │ │ ├── utils.ts │ │ │ └── vectorStore.ts │ │ ├── .env.example │ │ └── components.json │ ├── chatbot-nextjs │ │ ├── .eslintrc.json │ │ ├── .prettierrc │ │ ├── next.config.mjs │ │ ├── postcss.config.mjs │ │ ├── lib │ │ │ ├── utils.ts │ │ │ └── vectorStore.ts │ │ ├── .env.example │ │ └── components.json │ ├── chat-with-pdf-nextjs │ │ ├── .eslintrc.json │ │ ├── .prettierrc │ │ ├── next.config.mjs │ │ ├── postcss.config.mjs │ │ ├── lib │ │ │ ├── utils.ts │ │ │ └── vectorStore.ts │ │ ├── .env.example │ │ └── components.json │ └── semantic-search-nextjs │ │ ├── .eslintrc.json │ │ ├── .prettierrc │ │ ├── next.config.mjs │ │ ├── postcss.config.mjs │ │ ├── lib │ │ ├── utils.ts │ │ └── vectorStore.ts │ │ ├── .env.example │ │ └── components.json ├── aws-bedrock │ └── chatbot-nextjs │ │ ├── .env.example │ │ ├── .eslintrc.json │ │ ├── .prettierrc │ │ ├── postcss.config.mjs │ │ ├── lib │ │ └── utils.ts │ │ ├── next.config.mjs │ │ └── components.json ├── hybrid-search-nextjs │ ├── .eslintrc.json │ ├── .prettierrc │ ├── postcss.config.mjs │ ├── lib │ │ └── utils.ts │ ├── .env.example │ ├── next.config.mjs │ └── components.json ├── llamaindex │ ├── rag-nextjs │ │ ├── .eslintrc.json │ │ ├── .prettierrc │ │ ├── postcss.config.mjs │ │ ├── lib │ │ │ ├── utils.ts │ │ │ └── vectorStore.ts │ │ ├── next.config.mjs │ │ ├── .env.example │ │ └── components.json │ ├── chatbot-nextjs │ │ ├── .eslintrc.json │ │ ├── .prettierrc │ │ ├── postcss.config.mjs │ │ ├── lib │ │ │ ├── utils.ts │ │ │ └── vectorStore.ts │ │ ├── next.config.mjs │ │ ├── .env.example │ │ └── components.json │ ├── chat-with-pdf-nextjs │ │ ├── .eslintrc.json │ │ ├── .prettierrc │ │ ├── postcss.config.mjs │ │ ├── lib │ │ │ ├── utils.ts │ │ │ └── vectorStore.ts │ │ ├── next.config.mjs │ │ ├── .env.example │ │ └── components.json │ ├── semantic-search-nextjs │ │ ├── .eslintrc.json │ │ ├── .prettierrc │ │ ├── postcss.config.mjs │ │ ├── lib │ │ │ ├── utils.ts │ │ │ └── vectorStore.ts │ │ ├── next.config.mjs │ │ ├── .env.example │ │ └── components.json │ └── reverse-image-search-nextjs │ │ ├── .eslintrc.json │ │ ├── .prettierrc │ │ ├── postcss.config.mjs │ │ ├── lib │ │ ├── utils.ts │ │ └── vectorStore.ts │ │ ├── .env.example │ │ ├── components.json │ │ └── next.config.mjs └── inngest │ ├── rag-starter-nextjs │ ├── .eslintrc.json │ ├── src │ │ ├── app │ │ │ ├── favicon.ico │ │ │ ├── fonts │ │ │ │ ├── GeistVF.woff │ │ │ │ └── GeistMonoVF.woff │ │ │ ├── api │ │ │ │ └── inngest │ │ │ │ │ └── route.ts │ │ │ └── globals.css │ │ └── inngest │ │ │ └── client.ts │ ├── next.config.ts │ ├── postcss.config.mjs │ └── tailwind.config.ts │ └── auto-embeddings-nextjs │ ├── .eslintrc.json │ ├── src │ ├── app │ │ ├── favicon.ico │ │ ├── fonts │ │ │ ├── GeistVF.woff │ │ │ └── GeistMonoVF.woff │ │ └── globals.css │ └── inngest │ │ └── client.ts │ ├── next.config.ts │ ├── postcss.config.mjs │ └── tailwind.config.ts ├── with-neon-serverless ├── .gitignore ├── .env.example ├── package.json ├── delete_data.js └── update_data.js ├── with-node-postgres ├── .gitignore ├── .env.example └── package.json ├── with-rust-tokio-postgres ├── .gitignore └── .env.example ├── with-sequelize ├── .gitignore ├── .env.example └── package.json ├── with-nextjs-drizzle-edge ├── .npmrc ├── .eslintrc.json ├── .prettierrc.json ├── .env.example ├── postcss.config.js ├── next.config.js ├── app │ ├── layout.tsx │ ├── globals.css │ └── api │ │ └── users │ │ └── route.ts ├── drizzle.config.ts ├── lib │ ├── schema.ts │ └── drizzle.server.ts └── tailwind.config.js ├── with-node-postgres-js ├── .gitignore ├── .env.example └── package.json ├── with-sveltekit-feature-flags ├── .npmrc ├── src │ ├── app.css │ ├── lib │ │ ├── postgres.server.ts │ │ └── feature_flags │ │ │ ├── set.server.ts │ │ │ ├── get.server.ts │ │ │ └── setup.server.ts │ ├── app.d.ts │ └── app.html ├── .env.example ├── postcss.config.js ├── tailwind.config.js ├── .prettierrc ├── vite.config.ts ├── .gitignore └── .prettierignore ├── with-hyperdrive ├── worker-configuration.d.ts ├── wrangler.toml └── package.json ├── with-nextjs-drizzle-local-vercel ├── .npmrc ├── .eslintrc.json ├── .prettierrc.json ├── postcss.config.js ├── .env.example ├── next.config.js ├── app │ ├── layout.tsx │ └── globals.css ├── lib │ └── schema.ts ├── tailwind.config.js └── drizzle.config.ts ├── with_elixir_postgrex ├── test │ ├── test_helper.exs │ └── with_elixir_postgrex_test.exs ├── .formatter.exs ├── config │ └── config.exs.example └── lib │ └── with_elixir_postgrex.ex ├── with-astro ├── src │ └── env.d.ts ├── tsconfig.json ├── .env.example ├── .vscode │ ├── extensions.json │ └── launch.json ├── astro.config.mjs └── package.json ├── with-python-asyncpg ├── requirements.txt └── .env.example ├── with-astro-api-routes ├── src │ ├── env.d.ts │ └── pages │ │ └── api │ │ └── version.ts ├── tsconfig.json ├── .env.example ├── .vscode │ ├── extensions.json │ └── launch.json ├── astro.config.mjs └── package.json ├── with-nextjs-prisma ├── .env.example ├── .eslintrc.json ├── app │ └── globals.css ├── postcss.config.js ├── .vscode │ └── settings.json ├── prisma │ ├── migrations │ │ ├── migration_lock.toml │ │ └── 20230226214531_initial_migration │ │ │ └── migration.sql │ └── schema.prisma ├── next.config.js ├── tailwind.config.js └── .gitignore ├── with-python-psycopg ├── requirements.txt └── .env.example ├── with-python-psycopg2 ├── requirements.txt └── .env.example ├── with-remix ├── .gitignore ├── .env.example └── vite.config.ts ├── with-rust-cloudflare-workers ├── .gitignore ├── .cargo │ └── config.toml ├── wrangler.toml └── package.json ├── with-tanstack-start ├── .prettierignore ├── public │ └── favicon.ico ├── .env.example ├── .gitignore ├── tsconfig.json ├── app │ ├── app.css │ ├── client.tsx │ ├── ssr.tsx │ └── router.tsx └── app.config.ts ├── with-encore ├── encore.app ├── hello │ ├── encore.service.ts │ ├── db.ts │ └── migrations │ │ └── 1_create_table.up.sql ├── .gitignore └── package.json ├── with-solid-start ├── src │ ├── global.d.ts │ ├── entry-client.tsx │ └── app.tsx ├── .env.example ├── app.config.ts ├── tsconfig.json └── package.json ├── auth └── with-authjs-next │ ├── .eslintrc.json │ ├── app │ └── api │ │ └── auth │ │ └── [...nextauth] │ │ └── route.ts │ ├── next.config.mjs │ ├── .prettierrc.json │ ├── postcss.config.mjs │ ├── .env.example │ ├── auth.ts │ └── tailwind.config.ts ├── with-electricsql ├── react-app │ ├── src │ │ ├── vite-env.d.ts │ │ ├── main.tsx │ │ └── App.tsx │ ├── tsconfig.json │ ├── vite.config.ts │ ├── index.html │ └── .gitignore └── docker-compose.yaml ├── with-nestjs ├── .prettierrc ├── .env.example ├── tsconfig.build.json ├── nest-cli.json ├── src │ ├── main.ts │ ├── app.service.ts │ ├── app.controller.ts │ ├── app.module.ts │ └── database │ │ └── database.module.ts └── test │ └── jest-e2e.json ├── with-nextjs-aws-s3 ├── .eslintrc.json ├── app │ └── favicon.ico ├── next.config.mjs ├── postcss.config.mjs └── .env.example ├── with-react-router ├── .dockerignore ├── .gitignore ├── .env.example ├── public │ └── favicon.ico ├── app │ ├── routes.ts │ └── app.css ├── react-router.config.ts └── vite.config.ts ├── with-nextjs-edge-functions ├── .eslintrc.json ├── .env.example ├── next.config.mjs ├── postcss.config.mjs └── app │ └── api │ └── route.ts ├── with-nextjs-prisma-edge ├── .eslintrc.json ├── .prettierrc.json ├── postcss.config.js ├── next.config.js ├── .env.example ├── app │ ├── layout.tsx │ ├── globals.css │ └── api │ │ └── users │ │ └── route.ts └── tailwind.config.js ├── with-nextjs-server-actions ├── .eslintrc.json ├── .env.example ├── app │ └── favicon.ico ├── next.config.mjs └── postcss.config.mjs ├── with-dotnet-entity-framework └── NeonEfExample │ ├── .gitignore │ ├── Models │ └── Todo.cs │ ├── appsettings.Development.json │ ├── appsettings.json │ └── Data │ └── ApplicationDbContext.cs ├── with-nextjs-get-static-props ├── .eslintrc.json ├── .env.example ├── next.config.mjs ├── postcss.config.mjs └── pages │ └── index.tsx ├── with-nextjs-server-components ├── .eslintrc.json ├── .env.example ├── app │ ├── favicon.ico │ └── page.tsx ├── next.config.mjs └── postcss.config.mjs ├── with-micronaut-kotlin ├── settings.gradle.kts ├── gradle.properties ├── src │ ├── test │ │ └── resources │ │ │ └── junit-platform.properties │ └── main │ │ ├── kotlin │ │ ├── with │ │ │ └── micronaut │ │ │ │ └── kotlin │ │ │ │ └── Application.kt │ │ └── com │ │ │ └── example │ │ │ ├── repository │ │ │ └── BookRepository.kt │ │ │ └── entity │ │ │ └── Book.kt │ │ └── resources │ │ ├── db │ │ └── migration │ │ │ └── V1__create_book_table.sql │ │ └── application.yml ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties ├── .gitignore └── micronaut-cli.yml ├── with-nextjs-get-server-side-props ├── .eslintrc.json ├── .env.example ├── next.config.mjs ├── postcss.config.mjs └── pages │ └── index.tsx ├── with-nextjs-serverless-functions ├── .eslintrc.json ├── .env.example ├── next.config.mjs ├── postcss.config.mjs └── pages │ └── api │ └── index.ts ├── with-redwoodsdk ├── src │ ├── client.tsx │ ├── app │ │ └── shared │ │ │ └── links.ts │ └── worker.tsx ├── types │ ├── vite.d.ts │ ├── rw.d.ts │ └── css.d.ts ├── .env.example └── vite.config.mts ├── with-nextjs-prisma-cloudflare-workers ├── .eslintrc.json ├── .prettierrc.json ├── postcss.config.js ├── wrangler.toml ├── app │ ├── layout.tsx │ ├── globals.css │ └── api │ │ └── users │ │ └── route.ts ├── .env.example ├── tailwind.config.js └── next.config.mjs ├── with-ruby ├── Gemfile ├── .env.example └── index.rb ├── vercel.json ├── with-dotnet-npgsql └── NeonLibraryExample │ ├── .gitignore │ └── appsettings.json.example ├── with-waku ├── .gitignore ├── .env.example ├── tailwind.config.js ├── postcss.config.js ├── src │ ├── styles.css │ └── pages │ │ └── index.tsx └── tsconfig.json ├── with_phoenix ├── priv │ ├── repo │ │ ├── migrations │ │ │ └── .formatter.exs │ │ └── seeds.exs │ └── static │ │ ├── favicon.ico │ │ ├── robots.txt.gz │ │ ├── images │ │ ├── logo.svg.gz │ │ └── logo-06a11be1f2cdde2c851763d00bdd2e80.svg.gz │ │ ├── favicon-91f37b602a111216f1eef3aa337ad763.ico │ │ ├── robots-9e2c81b0855bbff2baa8371bc4a78186.txt.gz │ │ ├── robots.txt │ │ └── robots-9e2c81b0855bbff2baa8371bc4a78186.txt ├── test │ ├── test_helper.exs │ └── with_phoenix_web │ │ └── controllers │ │ ├── page_controller_test.exs │ │ ├── error_json_test.exs │ │ └── error_html_test.exs ├── lib │ ├── with_phoenix │ │ ├── mailer.ex │ │ └── repo.ex │ ├── with_phoenix.ex │ └── with_phoenix_web │ │ ├── controllers │ │ ├── page_controller.ex │ │ └── page_html.ex │ │ └── components │ │ └── layouts.ex ├── assets │ └── css │ │ └── app.css └── .formatter.exs ├── .gitignore ├── with-bun ├── .env.example ├── using-bun-sql.ts ├── package.json └── using-neon-serverless-driver.ts ├── with-dart ├── pubspec.yaml └── index.dart ├── deploy-with-deno ├── deno.json ├── .env.example └── deno.lock ├── with-express ├── .env.example ├── package.json └── src │ └── api │ └── index.js ├── with-fastify ├── .env.example ├── routes │ ├── example │ │ └── index.js │ └── root.js └── plugins │ ├── support.js │ └── sensible.js ├── with-hono ├── .env.example ├── vercel.json ├── tsconfig.json ├── package.json └── .gitignore ├── with-nodejs ├── .env.example ├── package.json └── index.js ├── assets └── images │ ├── github-hybrid-search.jpg │ ├── github-pdf-langchain.jpg │ ├── github-pdf-llamaindex.jpg │ ├── github-ai-chatbot-langchain.jpg │ ├── github-ai-chatbot-llamaindex.jpg │ ├── github-image-search-llamaindex.jpg │ ├── github-rag-chatbot-langchain.jpg │ ├── github-rag-chatbot-llamaindex.jpg │ ├── github-search-chatbot-langchain.jpg │ └── github-search-chatbot-llamaindex.jpg ├── deploy-with-heroku ├── .env.example └── neon-heroku-example │ └── package.json ├── deploy-with-render ├── .env.example └── neon-render-example │ └── package.json ├── with-golang-gorm └── .env.example ├── with-nodejs-pg-notify ├── .env.example └── package.json ├── deploy-with-railway ├── .env.example └── neon-railway-example │ └── package.json ├── with-sqlalchemy-asyncpg ├── .env.example └── requirements.txt ├── deploy-with-cloudflare-pages ├── .env.example ├── my-neon-page │ ├── .dev.vars │ ├── vite.config.js │ ├── src │ │ └── main.jsx │ ├── .gitignore │ ├── functions │ │ └── books │ │ │ └── index.js │ ├── index.html │ └── README.md ├── vite.config.js ├── src │ └── main.jsx ├── functions │ └── books │ │ └── index.js └── index.html ├── deploy-with-cloudflare-workers ├── .env.example └── my-neon-worker │ ├── .prettierrc │ ├── .dev.vars │ ├── .editorconfig │ ├── vitest.config.js │ ├── src │ └── index.js │ └── package.json ├── deploy-with-netlify-functions ├── .env.example └── neon-netlify-example │ └── package.json └── elements_data_set └── elements.sql /with-nuxt/README.md: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /with-analog/public/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /with-fastapi/app/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /with-golang/.gitignore: -------------------------------------------------------------------------------- 1 | .env -------------------------------------------------------------------------------- /with-wasp/public/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /with-django/myproject/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /with-fastapi/app/api/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /with-java-jdbc/.mvn/jvm.config: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /with-java-jdbc/.mvn/maven.config: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /with-laravel/public/favicon.ico: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /with-angular/src/app/app.component.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /with-laravel/resources/css/app.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /with_reflex/with_reflex/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /with-prisma/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | .env -------------------------------------------------------------------------------- /with-django/.gitignore: -------------------------------------------------------------------------------- 1 | venv 2 | __pycache__ 3 | -------------------------------------------------------------------------------- /with-fastapi/.gitignore: -------------------------------------------------------------------------------- 1 | venv 2 | __pycache__ 3 | -------------------------------------------------------------------------------- /with-flask/.gitignore: -------------------------------------------------------------------------------- 1 | venv 2 | __pycache__ 3 | -------------------------------------------------------------------------------- /with-knex/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | .env 3 | -------------------------------------------------------------------------------- /with-laravel/database/.gitignore: -------------------------------------------------------------------------------- 1 | *.sqlite* 2 | -------------------------------------------------------------------------------- /with-rust-postgres/.gitignore: -------------------------------------------------------------------------------- 1 | target 2 | .env -------------------------------------------------------------------------------- /with-sveltekit/.npmrc: -------------------------------------------------------------------------------- 1 | engine-strict=true 2 | -------------------------------------------------------------------------------- /ai/langchain/react-agent-python/.gitignore: -------------------------------------------------------------------------------- 1 | venv 2 | -------------------------------------------------------------------------------- /with-java-jdbc/.gitignore: -------------------------------------------------------------------------------- 1 | .env 2 | target/ 3 | build/ -------------------------------------------------------------------------------- /with-neon-serverless/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | .env -------------------------------------------------------------------------------- /with-node-postgres/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | .env -------------------------------------------------------------------------------- /with-rust-tokio-postgres/.gitignore: -------------------------------------------------------------------------------- 1 | target 2 | .env -------------------------------------------------------------------------------- /with-sequelize/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | .env 3 | -------------------------------------------------------------------------------- /with-laravel/resources/js/app.js: -------------------------------------------------------------------------------- 1 | import './bootstrap'; 2 | -------------------------------------------------------------------------------- /with-laravel/storage/logs/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /with-nextjs-drizzle-edge/.npmrc: -------------------------------------------------------------------------------- 1 | legacy-peer-deps=true 2 | -------------------------------------------------------------------------------- /with-node-postgres-js/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | .env -------------------------------------------------------------------------------- /with-sveltekit-feature-flags/.npmrc: -------------------------------------------------------------------------------- 1 | engine-strict=true 2 | -------------------------------------------------------------------------------- /with-hyperdrive/worker-configuration.d.ts: -------------------------------------------------------------------------------- 1 | interface Env {} 2 | -------------------------------------------------------------------------------- /with-laravel/bootstrap/cache/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /with-laravel/public/robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | Disallow: 3 | -------------------------------------------------------------------------------- /with-nextjs-drizzle-local-vercel/.npmrc: -------------------------------------------------------------------------------- 1 | legacy-peer-deps=true -------------------------------------------------------------------------------- /with-wasp/.wasproot: -------------------------------------------------------------------------------- 1 | File marking the root of Wasp project. 2 | -------------------------------------------------------------------------------- /with_elixir_postgrex/test/test_helper.exs: -------------------------------------------------------------------------------- 1 | ExUnit.start() 2 | -------------------------------------------------------------------------------- /with-astro/src/env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | -------------------------------------------------------------------------------- /with-laravel/storage/app/public/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /with-python-asyncpg/requirements.txt: -------------------------------------------------------------------------------- 1 | asyncpg 2 | python-dotenv 3 | -------------------------------------------------------------------------------- /with_reflex/alembic/README: -------------------------------------------------------------------------------- 1 | Generic single-database configuration. -------------------------------------------------------------------------------- /with-analog/src/vite-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | -------------------------------------------------------------------------------- /with-astro/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "astro/tsconfigs/strict" 3 | } -------------------------------------------------------------------------------- /with-laravel/storage/app/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !public/ 3 | !.gitignore 4 | -------------------------------------------------------------------------------- /with-laravel/storage/framework/sessions/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /with-laravel/storage/framework/testing/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /with-laravel/storage/framework/views/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /with-wasp/src/vite-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | -------------------------------------------------------------------------------- /with-astro-api-routes/src/env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | -------------------------------------------------------------------------------- /with-laravel/storage/framework/cache/data/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /with-nextjs-prisma/.env.example: -------------------------------------------------------------------------------- 1 | DATABASE_URL = "" 2 | DIRECT_DATABASE_URL = "" -------------------------------------------------------------------------------- /with-nuxt/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./.nuxt/tsconfig.json" 3 | } 4 | -------------------------------------------------------------------------------- /with-python-psycopg/requirements.txt: -------------------------------------------------------------------------------- 1 | psycopg[binary] 2 | python-dotenv 3 | -------------------------------------------------------------------------------- /with-python-psycopg2/requirements.txt: -------------------------------------------------------------------------------- 1 | psycopg2-binary 2 | python-dotenv 3 | -------------------------------------------------------------------------------- /with-remix/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | 3 | /.cache 4 | /build 5 | .env 6 | -------------------------------------------------------------------------------- /with-rust-cloudflare-workers/.gitignore: -------------------------------------------------------------------------------- 1 | target 2 | build 3 | node_modules 4 | -------------------------------------------------------------------------------- /with-tanstack-start/.prettierignore: -------------------------------------------------------------------------------- 1 | **/build 2 | **/public 3 | routeTree.gen.ts -------------------------------------------------------------------------------- /ai/langchain/react-agent-python/.env.example: -------------------------------------------------------------------------------- 1 | DB_URI="..." 2 | OPENAI_API_KEY="..." -------------------------------------------------------------------------------- /with-encore/encore.app: -------------------------------------------------------------------------------- 1 | { 2 | "id": "", 3 | "lang": "typescript" 4 | } 5 | 6 | -------------------------------------------------------------------------------- /with-laravel/storage/framework/cache/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !data/ 3 | !.gitignore 4 | -------------------------------------------------------------------------------- /with-solid-start/src/global.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | -------------------------------------------------------------------------------- /with_reflex/requirements.txt: -------------------------------------------------------------------------------- 1 | python-dotenv 2 | reflex==0.8.17 3 | psycopg2-binary -------------------------------------------------------------------------------- /ai/aws-bedrock/chatbot-nextjs/.env.example: -------------------------------------------------------------------------------- 1 | AWS_KEY_ID="..." 2 | AWS_SECRET_KEY="..." 3 | -------------------------------------------------------------------------------- /auth/with-authjs-next/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "next/core-web-vitals" 3 | } 4 | -------------------------------------------------------------------------------- /with-astro-api-routes/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "astro/tsconfigs/strict" 3 | } -------------------------------------------------------------------------------- /with-electricsql/react-app/src/vite-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | -------------------------------------------------------------------------------- /with-nestjs/.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "singleQuote": true, 3 | "trailingComma": "all" 4 | } -------------------------------------------------------------------------------- /with-nextjs-aws-s3/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "next/core-web-vitals" 3 | } 4 | -------------------------------------------------------------------------------- /with-nextjs-prisma/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "next/core-web-vitals" 3 | } 4 | -------------------------------------------------------------------------------- /with-react-router/.dockerignore: -------------------------------------------------------------------------------- 1 | .react-router 2 | build 3 | node_modules 4 | README.md -------------------------------------------------------------------------------- /with-wasp/.waspignore: -------------------------------------------------------------------------------- 1 | # Ignore editor tmp files 2 | **/*~ 3 | **/#*# 4 | .DS_Store 5 | -------------------------------------------------------------------------------- /ai/hybrid-search-nextjs/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "next/core-web-vitals" 3 | } 4 | -------------------------------------------------------------------------------- /ai/langchain/rag-nextjs/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "next/core-web-vitals" 3 | } 4 | -------------------------------------------------------------------------------- /ai/llamaindex/rag-nextjs/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "next/core-web-vitals" 3 | } 4 | -------------------------------------------------------------------------------- /with-nextjs-drizzle-edge/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "next/core-web-vitals" 3 | } 4 | -------------------------------------------------------------------------------- /with-nextjs-edge-functions/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "next/core-web-vitals" 3 | } 4 | -------------------------------------------------------------------------------- /with-nextjs-prisma-edge/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "next/core-web-vitals" 3 | } 4 | -------------------------------------------------------------------------------- /with-nextjs-server-actions/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "next/core-web-vitals" 3 | } 4 | -------------------------------------------------------------------------------- /with-nuxt/server/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../.nuxt/tsconfig.server.json" 3 | } 4 | -------------------------------------------------------------------------------- /ai/aws-bedrock/chatbot-nextjs/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "next/core-web-vitals" 3 | } 4 | -------------------------------------------------------------------------------- /ai/langchain/chatbot-nextjs/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "next/core-web-vitals" 3 | } 4 | -------------------------------------------------------------------------------- /ai/llamaindex/chatbot-nextjs/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "next/core-web-vitals" 3 | } 4 | -------------------------------------------------------------------------------- /with-dotnet-entity-framework/NeonEfExample/.gitignore: -------------------------------------------------------------------------------- 1 | # .NET Core build folders 2 | bin/ 3 | obj/ -------------------------------------------------------------------------------- /with-nextjs-get-static-props/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "next/core-web-vitals" 3 | } 4 | -------------------------------------------------------------------------------- /with-nextjs-server-components/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "next/core-web-vitals" 3 | } 4 | -------------------------------------------------------------------------------- /with-sveltekit/src/app.css: -------------------------------------------------------------------------------- 1 | @tailwind base; 2 | @tailwind components; 3 | @tailwind utilities; 4 | -------------------------------------------------------------------------------- /ai/langchain/chat-with-pdf-nextjs/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "next/core-web-vitals" 3 | } 4 | -------------------------------------------------------------------------------- /ai/langchain/semantic-search-nextjs/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "next/core-web-vitals" 3 | } 4 | -------------------------------------------------------------------------------- /ai/llamaindex/chat-with-pdf-nextjs/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "next/core-web-vitals" 3 | } 4 | -------------------------------------------------------------------------------- /ai/llamaindex/semantic-search-nextjs/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "next/core-web-vitals" 3 | } 4 | -------------------------------------------------------------------------------- /with-angular/src/app/app.component.html: -------------------------------------------------------------------------------- 1 | 2 | {{ postgresVersion }} 3 | -------------------------------------------------------------------------------- /with-micronaut-kotlin/settings.gradle.kts: -------------------------------------------------------------------------------- 1 | 2 | 3 | rootProject.name="with-micronaut-kotlin" 4 | 5 | -------------------------------------------------------------------------------- /with-nextjs-drizzle-local-vercel/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "next/core-web-vitals" 3 | } 4 | -------------------------------------------------------------------------------- /with-nextjs-get-server-side-props/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "next/core-web-vitals" 3 | } 4 | -------------------------------------------------------------------------------- /with-nextjs-serverless-functions/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "next/core-web-vitals" 3 | } 4 | -------------------------------------------------------------------------------- /with-redwoodsdk/src/client.tsx: -------------------------------------------------------------------------------- 1 | import { initClient } from "rwsdk/client"; 2 | 3 | initClient(); 4 | -------------------------------------------------------------------------------- /ai/llamaindex/reverse-image-search-nextjs/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "next/core-web-vitals" 3 | } 4 | -------------------------------------------------------------------------------- /with-knex/.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "semi": false, 3 | "printWidth": 180, 4 | "singleQuote": true 5 | } 6 | -------------------------------------------------------------------------------- /with-nextjs-prisma-cloudflare-workers/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "next/core-web-vitals" 3 | } 4 | -------------------------------------------------------------------------------- /with-nextjs-prisma/app/globals.css: -------------------------------------------------------------------------------- 1 | @tailwind base; 2 | @tailwind components; 3 | @tailwind utilities; 4 | -------------------------------------------------------------------------------- /with-ruby/Gemfile: -------------------------------------------------------------------------------- 1 | source "https://rubygems.org" 2 | ruby "2.6.10p210" 3 | 4 | gem "pg" 5 | gem "dotenv" 6 | -------------------------------------------------------------------------------- /with_reflex/.gitignore: -------------------------------------------------------------------------------- 1 | *.db 2 | .web 3 | .states 4 | __pycache__/ 5 | *.py[cod] 6 | assets/external/ 7 | -------------------------------------------------------------------------------- /vercel.json: -------------------------------------------------------------------------------- 1 | { 2 | "git": { 3 | "deploymentEnabled": { 4 | "main": false 5 | } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /with-angular/src/styles.css: -------------------------------------------------------------------------------- 1 | /* You can add global styles to this file, and also import other style files */ 2 | -------------------------------------------------------------------------------- /with-dotnet-npgsql/NeonLibraryExample/.gitignore: -------------------------------------------------------------------------------- 1 | # .NET Core build folders 2 | bin/ 3 | obj/ 4 | appsettings.json -------------------------------------------------------------------------------- /with-sveltekit-feature-flags/src/app.css: -------------------------------------------------------------------------------- 1 | @tailwind base; 2 | @tailwind components; 3 | @tailwind utilities; 4 | -------------------------------------------------------------------------------- /with-waku/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | dist 3 | .env* 4 | *.tsbuildinfo 5 | .cache 6 | .DS_Store 7 | *.pem 8 | -------------------------------------------------------------------------------- /with-wasp/src/waspLogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neondatabase/examples/HEAD/with-wasp/src/waspLogo.png -------------------------------------------------------------------------------- /ai/inngest/rag-starter-nextjs/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": ["next/core-web-vitals", "next/typescript"] 3 | } 4 | -------------------------------------------------------------------------------- /with-analog/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neondatabase/examples/HEAD/with-analog/public/favicon.ico -------------------------------------------------------------------------------- /with-react-router/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | /node_modules/ 3 | 4 | # React Router 5 | /.react-router/ 6 | /build/ 7 | -------------------------------------------------------------------------------- /with_phoenix/priv/repo/migrations/.formatter.exs: -------------------------------------------------------------------------------- 1 | [ 2 | import_deps: [:ecto_sql], 3 | inputs: ["*.exs"] 4 | ] 5 | -------------------------------------------------------------------------------- /with_phoenix/test/test_helper.exs: -------------------------------------------------------------------------------- 1 | ExUnit.start() 2 | Ecto.Adapters.SQL.Sandbox.mode(WithPhoenix.Repo, :manual) 3 | -------------------------------------------------------------------------------- /with_reflex/assets/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neondatabase/examples/HEAD/with_reflex/assets/favicon.ico -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | venv/ 2 | node_modules 3 | package-lock.json 4 | .env 5 | .DS_Store 6 | # Local Netlify folder 7 | .netlify 8 | -------------------------------------------------------------------------------- /ai/hybrid-search-nextjs/.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "semi": false, 3 | "printWidth": 180, 4 | "singleQuote": true 5 | } 6 | -------------------------------------------------------------------------------- /ai/inngest/auto-embeddings-nextjs/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": ["next/core-web-vitals", "next/typescript"] 3 | } 4 | -------------------------------------------------------------------------------- /ai/langchain/chatbot-nextjs/.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "semi": false, 3 | "printWidth": 180, 4 | "singleQuote": true 5 | } 6 | -------------------------------------------------------------------------------- /ai/langchain/rag-nextjs/.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "semi": false, 3 | "printWidth": 180, 4 | "singleQuote": true 5 | } 6 | -------------------------------------------------------------------------------- /ai/llamaindex/rag-nextjs/.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "semi": false, 3 | "printWidth": 180, 4 | "singleQuote": true 5 | } 6 | -------------------------------------------------------------------------------- /with-angular/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neondatabase/examples/HEAD/with-angular/public/favicon.ico -------------------------------------------------------------------------------- /with-angular/src/app/app.routes.ts: -------------------------------------------------------------------------------- 1 | import { Routes } from '@angular/router'; 2 | 3 | export const routes: Routes = []; 4 | -------------------------------------------------------------------------------- /with-bun/.env.example: -------------------------------------------------------------------------------- 1 | POSTGRES_URL="postgresql://neondb_owner:...@ep-...us-east-1.aws.neon.tech/neondb?sslmode=require" 2 | -------------------------------------------------------------------------------- /with-dart/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: with_dart 2 | environment: 3 | sdk: '^3.5.0' 4 | dependencies: 5 | postgres: ^3.2.1 6 | -------------------------------------------------------------------------------- /with-laravel/bootstrap/providers.php: -------------------------------------------------------------------------------- 1 | :@.neon.tech:/?sslmode=require" 2 | -------------------------------------------------------------------------------- /with-wasp/.env.example: -------------------------------------------------------------------------------- 1 | DATABASE_URL="postgres://:@.neon.tech:/?sslmode=require" 2 | -------------------------------------------------------------------------------- /with_phoenix/lib/with_phoenix/mailer.ex: -------------------------------------------------------------------------------- 1 | defmodule WithPhoenix.Mailer do 2 | use Swoosh.Mailer, otp_app: :with_phoenix 3 | end 4 | -------------------------------------------------------------------------------- /with_phoenix/priv/static/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neondatabase/examples/HEAD/with_phoenix/priv/static/favicon.ico -------------------------------------------------------------------------------- /with_phoenix/priv/static/robots.txt.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neondatabase/examples/HEAD/with_phoenix/priv/static/robots.txt.gz -------------------------------------------------------------------------------- /ai/llamaindex/reverse-image-search-nextjs/.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "semi": false, 3 | "printWidth": 180, 4 | "singleQuote": true 5 | } 6 | -------------------------------------------------------------------------------- /assets/images/github-pdf-llamaindex.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neondatabase/examples/HEAD/assets/images/github-pdf-llamaindex.jpg -------------------------------------------------------------------------------- /deploy-with-railway/.env.example: -------------------------------------------------------------------------------- 1 | DATABASE_URL="postgresql://neondb_owner:...@ep-...us-east-1.aws.neon.tech/neondb?sslmode=require" 2 | -------------------------------------------------------------------------------- /with-analog/postcss.config.cjs: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: { 3 | tailwindcss: {}, 4 | autoprefixer: {}, 5 | }, 6 | }; 7 | -------------------------------------------------------------------------------- /with-astro-api-routes/.env.example: -------------------------------------------------------------------------------- 1 | DATABASE_URL="postgresql://neondb_owner:...@ep-...us-east-1.aws.neon.tech/neondb?sslmode=require" 2 | -------------------------------------------------------------------------------- /with-astro/.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "recommendations": ["astro-build.astro-vscode"], 3 | "unwantedRecommendations": [] 4 | } 5 | -------------------------------------------------------------------------------- /with-encore/hello/encore.service.ts: -------------------------------------------------------------------------------- 1 | import { Service } from "encore.dev/service"; 2 | 3 | export default new Service("hello"); 4 | 5 | -------------------------------------------------------------------------------- /with-nextjs-drizzle-edge/.env.example: -------------------------------------------------------------------------------- 1 | POSTGRES_URL="postgresql://neondb_owner:...@ep-...us-east-2.aws.neon.tech/neondb?sslmode=require" -------------------------------------------------------------------------------- /with-nextjs-prisma-cloudflare-workers/.prettierrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "semi": false, 3 | "singleQuote": true, 4 | "printWidth": 180 5 | } 6 | -------------------------------------------------------------------------------- /with-redwoodsdk/src/app/shared/links.ts: -------------------------------------------------------------------------------- 1 | import { defineLinks } from "rwsdk/router"; 2 | 3 | export const link = defineLinks(["/"]); 4 | -------------------------------------------------------------------------------- /with-sqlalchemy-asyncpg/.env.example: -------------------------------------------------------------------------------- 1 | DATABASE_URL="postgresql://neondb_owner:...@ep-...us-east-1.aws.neon.tech/neondb?sslmode=require" 2 | -------------------------------------------------------------------------------- /with-sveltekit/postcss.config.js: -------------------------------------------------------------------------------- 1 | export default { 2 | plugins: { 3 | tailwindcss: {}, 4 | autoprefixer: {}, 5 | }, 6 | } 7 | -------------------------------------------------------------------------------- /with-tanstack-start/.env.example: -------------------------------------------------------------------------------- 1 | DATABASE_URL="postgresql://neondb_owner:...@ep-...us-east-1.aws.neon.tech/neondb?sslmode=require" 2 | -------------------------------------------------------------------------------- /auth/with-authjs-next/app/api/auth/[...nextauth]/route.ts: -------------------------------------------------------------------------------- 1 | import { handlers } from '@/auth' 2 | 3 | export const { GET, POST } = handlers 4 | -------------------------------------------------------------------------------- /auth/with-authjs-next/next.config.mjs: -------------------------------------------------------------------------------- 1 | /** @type {import('next').NextConfig} */ 2 | const nextConfig = {} 3 | 4 | export default nextConfig 5 | -------------------------------------------------------------------------------- /deploy-with-cloudflare-pages/.env.example: -------------------------------------------------------------------------------- 1 | DATABASE_URL="postgresql://neondb_owner:...@ep-...us-east-1.aws.neon.tech/neondb?sslmode=require" 2 | -------------------------------------------------------------------------------- /with-java-jdbc/java_connection_details.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neondatabase/examples/HEAD/with-java-jdbc/java_connection_details.png -------------------------------------------------------------------------------- /with-neon-serverless/.env.example: -------------------------------------------------------------------------------- 1 | DATABASE_URL="postgresql://[user]:[password]@[neon_hostname]/[dbname]?sslmode=require&channel_binding=require" -------------------------------------------------------------------------------- /with-nextjs-aws-s3/next.config.mjs: -------------------------------------------------------------------------------- 1 | /** @type {import('next').NextConfig} */ 2 | const nextConfig = {}; 3 | 4 | export default nextConfig; 5 | -------------------------------------------------------------------------------- /with-nextjs-edge-functions/.env.example: -------------------------------------------------------------------------------- 1 | DATABASE_URL="postgresql://neondb_owner:...@ep-...us-east-1.aws.neon.tech/neondb?sslmode=require" 2 | -------------------------------------------------------------------------------- /with-nextjs-get-static-props/.env.example: -------------------------------------------------------------------------------- 1 | DATABASE_URL="postgresql://neondb_owner:...@ep-...us-east-1.aws.neon.tech/neondb?sslmode=require" 2 | -------------------------------------------------------------------------------- /with-nextjs-prisma/postcss.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: { 3 | tailwindcss: {}, 4 | autoprefixer: {}, 5 | }, 6 | } 7 | -------------------------------------------------------------------------------- /with-nextjs-server-actions/.env.example: -------------------------------------------------------------------------------- 1 | DATABASE_URL="postgresql://neondb_owner:...@ep-...us-east-1.aws.neon.tech/neondb?sslmode=require" 2 | -------------------------------------------------------------------------------- /with-nextjs-server-actions/app/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neondatabase/examples/HEAD/with-nextjs-server-actions/app/favicon.ico -------------------------------------------------------------------------------- /with-node-postgres/.env.example: -------------------------------------------------------------------------------- 1 | DATABASE_URL="postgresql://[user]:[password]@[neon_hostname]/[dbname]?sslmode=require&channel_binding=require" -------------------------------------------------------------------------------- /with-sveltekit-feature-flags/.env.example: -------------------------------------------------------------------------------- 1 | DATABASE_URL="postgresql://neondb_owner:...@ep-...us-east-1.aws.neon.tech/neondb?sslmode=require" 2 | -------------------------------------------------------------------------------- /with_phoenix/priv/static/images/logo.svg.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neondatabase/examples/HEAD/with_phoenix/priv/static/images/logo.svg.gz -------------------------------------------------------------------------------- /ai/langchain/rag-nextjs/next.config.mjs: -------------------------------------------------------------------------------- 1 | /** @type {import('next').NextConfig} */ 2 | const nextConfig = {} 3 | 4 | export default nextConfig 5 | -------------------------------------------------------------------------------- /assets/images/github-ai-chatbot-langchain.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neondatabase/examples/HEAD/assets/images/github-ai-chatbot-langchain.jpg -------------------------------------------------------------------------------- /deploy-with-cloudflare-workers/.env.example: -------------------------------------------------------------------------------- 1 | DATABASE_URL="postgresql://neondb_owner:...@ep-...us-east-1.aws.neon.tech/neondb?sslmode=require" 2 | -------------------------------------------------------------------------------- /deploy-with-netlify-functions/.env.example: -------------------------------------------------------------------------------- 1 | DATABASE_URL="postgresql://neondb_owner:...@ep-...us-east-1.aws.neon.tech/neondb?sslmode=require" 2 | -------------------------------------------------------------------------------- /with-astro-api-routes/.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "recommendations": ["astro-build.astro-vscode"], 3 | "unwantedRecommendations": [] 4 | } 5 | -------------------------------------------------------------------------------- /with-golang/.env.example: -------------------------------------------------------------------------------- 1 | DATABASE_URL="postgresql://neondb_owner:...@ep-...us-east-1.aws.neon.tech/neondb?sslmode=require&channel_binding=require" -------------------------------------------------------------------------------- /with-hono/vercel.json: -------------------------------------------------------------------------------- 1 | { 2 | "rewrites": [ 3 | { 4 | "source": "/api/(.*)", 5 | "destination": "/api" 6 | } 7 | ] 8 | } 9 | -------------------------------------------------------------------------------- /with-nestjs/tsconfig.build.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "exclude": ["node_modules", "test", "dist", "**/*spec.ts"] 4 | } 5 | -------------------------------------------------------------------------------- /with-nextjs-drizzle-edge/postcss.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: { 3 | tailwindcss: {}, 4 | autoprefixer: {}, 5 | }, 6 | } 7 | -------------------------------------------------------------------------------- /with-nextjs-get-server-side-props/.env.example: -------------------------------------------------------------------------------- 1 | DATABASE_URL="postgresql://neondb_owner:...@ep-...us-east-1.aws.neon.tech/neondb?sslmode=require" 2 | -------------------------------------------------------------------------------- /with-nextjs-prisma-edge/postcss.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: { 3 | tailwindcss: {}, 4 | autoprefixer: {}, 5 | }, 6 | } 7 | -------------------------------------------------------------------------------- /with-nextjs-server-components/.env.example: -------------------------------------------------------------------------------- 1 | DATABASE_URL="postgresql://neondb_owner:...@ep-...us-east-1.aws.neon.tech/neondb?sslmode=require" 2 | -------------------------------------------------------------------------------- /with-nextjs-server-components/app/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neondatabase/examples/HEAD/with-nextjs-server-components/app/favicon.ico -------------------------------------------------------------------------------- /with-nextjs-serverless-functions/.env.example: -------------------------------------------------------------------------------- 1 | DATABASE_URL="postgresql://neondb_owner:...@ep-...us-east-1.aws.neon.tech/neondb?sslmode=require" 2 | -------------------------------------------------------------------------------- /with-node-postgres-js/.env.example: -------------------------------------------------------------------------------- 1 | DATABASE_URL="postgresql://[user]:[password]@[neon_hostname]/[dbname]?sslmode=require&channel_binding=require" -------------------------------------------------------------------------------- /with_elixir_postgrex/.formatter.exs: -------------------------------------------------------------------------------- 1 | # Used by "mix format" 2 | [ 3 | inputs: ["{mix,.formatter}.exs", "{config,lib,test}/**/*.{ex,exs}"] 4 | ] 5 | -------------------------------------------------------------------------------- /with_reflex/.env.example: -------------------------------------------------------------------------------- 1 | DATABASE_URL="postgresql://neondb_owner:...@ep-...us-east-1.aws.neon.tech/neondb?sslmode=require&channel_binding=require" -------------------------------------------------------------------------------- /ai/langchain/chatbot-nextjs/next.config.mjs: -------------------------------------------------------------------------------- 1 | /** @type {import('next').NextConfig} */ 2 | const nextConfig = {} 3 | 4 | export default nextConfig 5 | -------------------------------------------------------------------------------- /assets/images/github-ai-chatbot-llamaindex.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neondatabase/examples/HEAD/assets/images/github-ai-chatbot-llamaindex.jpg -------------------------------------------------------------------------------- /assets/images/github-image-search-llamaindex.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neondatabase/examples/HEAD/assets/images/github-image-search-llamaindex.jpg -------------------------------------------------------------------------------- /assets/images/github-rag-chatbot-langchain.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neondatabase/examples/HEAD/assets/images/github-rag-chatbot-langchain.jpg -------------------------------------------------------------------------------- /assets/images/github-rag-chatbot-llamaindex.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neondatabase/examples/HEAD/assets/images/github-rag-chatbot-llamaindex.jpg -------------------------------------------------------------------------------- /deploy-with-netlify-functions/neon-netlify-example/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "@neondatabase/serverless": "^1.0.0" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /with-astro/astro.config.mjs: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'astro/config'; 2 | 3 | // https://astro.build/config 4 | export default defineConfig({}); 5 | -------------------------------------------------------------------------------- /with-nextjs-edge-functions/next.config.mjs: -------------------------------------------------------------------------------- 1 | /** @type {import('next').NextConfig} */ 2 | const nextConfig = {}; 3 | 4 | export default nextConfig; 5 | -------------------------------------------------------------------------------- /with-nextjs-server-actions/next.config.mjs: -------------------------------------------------------------------------------- 1 | /** @type {import('next').NextConfig} */ 2 | const nextConfig = {}; 3 | 4 | export default nextConfig; 5 | -------------------------------------------------------------------------------- /with-nextjs-server-components/next.config.mjs: -------------------------------------------------------------------------------- 1 | /** @type {import('next').NextConfig} */ 2 | const nextConfig = {}; 3 | 4 | export default nextConfig; 5 | -------------------------------------------------------------------------------- /with-redwoodsdk/.env.example: -------------------------------------------------------------------------------- 1 | DATABASE_URL="postgresql://neondb_owner:...@ep-...us-east-1.aws.neon.tech/neondb?sslmode=require&channel_binding=require" -------------------------------------------------------------------------------- /with-sveltekit-feature-flags/postcss.config.js: -------------------------------------------------------------------------------- 1 | export default { 2 | plugins: { 3 | tailwindcss: {}, 4 | autoprefixer: {}, 5 | }, 6 | } 7 | -------------------------------------------------------------------------------- /with-waku/tailwind.config.js: -------------------------------------------------------------------------------- 1 | /** @type {import('tailwindcss').Config} */ 2 | export default { 3 | content: ['./src/**/*.{js,jsx,ts,tsx}'], 4 | }; 5 | -------------------------------------------------------------------------------- /ai/inngest/rag-starter-nextjs/src/app/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neondatabase/examples/HEAD/ai/inngest/rag-starter-nextjs/src/app/favicon.ico -------------------------------------------------------------------------------- /ai/langchain/chat-with-pdf-nextjs/next.config.mjs: -------------------------------------------------------------------------------- 1 | /** @type {import('next').NextConfig} */ 2 | const nextConfig = {} 3 | 4 | export default nextConfig 5 | -------------------------------------------------------------------------------- /ai/langchain/semantic-search-nextjs/next.config.mjs: -------------------------------------------------------------------------------- 1 | /** @type {import('next').NextConfig} */ 2 | const nextConfig = {} 3 | 4 | export default nextConfig 5 | -------------------------------------------------------------------------------- /assets/images/github-search-chatbot-langchain.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neondatabase/examples/HEAD/assets/images/github-search-chatbot-langchain.jpg -------------------------------------------------------------------------------- /assets/images/github-search-chatbot-llamaindex.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neondatabase/examples/HEAD/assets/images/github-search-chatbot-llamaindex.jpg -------------------------------------------------------------------------------- /with-java-jdbc/.env.example: -------------------------------------------------------------------------------- 1 | DATABASE_URL="jdbc:postgresql://[neon_hostname]/[dbname]?user=[user]&password=[password]&sslmode=require&channelBinding=require" -------------------------------------------------------------------------------- /with-knex/.env.example: -------------------------------------------------------------------------------- 1 | DATABASE_URL="postgresql://neondb_owner:...@ep-...us-east-1.aws.neon.tech/neondb?sslmode=require" 2 | NODE_PG_FORCE_NATIVE="true" 3 | -------------------------------------------------------------------------------- /with-laravel/app/Http/Controllers/Controller.php: -------------------------------------------------------------------------------- 1 | , document.getElementById("app")!); 5 | -------------------------------------------------------------------------------- /with-sveltekit/vite.config.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vite' 2 | import { sveltekit } from '@sveltejs/kit/vite' 3 | 4 | export default defineConfig({ 5 | plugins: [sveltekit()], 6 | }) 7 | -------------------------------------------------------------------------------- /with_phoenix/assets/css/app.css: -------------------------------------------------------------------------------- 1 | @import "tailwindcss/base"; 2 | @import "tailwindcss/components"; 3 | @import "tailwindcss/utilities"; 4 | 5 | /* This file is for your main application CSS */ 6 | -------------------------------------------------------------------------------- /with_phoenix/priv/static/favicon-91f37b602a111216f1eef3aa337ad763.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neondatabase/examples/HEAD/with_phoenix/priv/static/favicon-91f37b602a111216f1eef3aa337ad763.ico -------------------------------------------------------------------------------- /with-laravel/README.md: -------------------------------------------------------------------------------- 1 | - clone this example 2 | - run `composer install` 3 | - update `DB_URL` from the connection string in console in the .env file 4 | - run `php artisan migrate` to sync schema 5 | -------------------------------------------------------------------------------- /with-nextjs-prisma-cloudflare-workers/wrangler.toml: -------------------------------------------------------------------------------- 1 | name = "my-app" 2 | compatibility_date = "2024-07-29" 3 | compatibility_flags = ["nodejs_compat"] 4 | pages_build_output_dir = ".vercel/output/static" -------------------------------------------------------------------------------- /with-nextjs-prisma/next.config.js: -------------------------------------------------------------------------------- 1 | /** @type {import('next').NextConfig} */ 2 | const nextConfig = { 3 | experimental: { 4 | appDir: true, 5 | }, 6 | } 7 | 8 | module.exports = nextConfig 9 | -------------------------------------------------------------------------------- /with-rust-cloudflare-workers/.cargo/config.toml: -------------------------------------------------------------------------------- 1 | # It's recommended to set the flag on a per-target basis: 2 | [target.wasm32-unknown-unknown] 3 | rustflags = ['--cfg', 'getrandom_backend="wasm_js"'] 4 | -------------------------------------------------------------------------------- /with-sveltekit-feature-flags/.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "semi": false, 3 | "printWidth": 180, 4 | "singleQuote": true, 5 | "plugins": ["prettier-plugin-tailwindcss", "prettier-plugin-svelte"] 6 | } 7 | -------------------------------------------------------------------------------- /with_phoenix/priv/static/robots-9e2c81b0855bbff2baa8371bc4a78186.txt.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neondatabase/examples/HEAD/with_phoenix/priv/static/robots-9e2c81b0855bbff2baa8371bc4a78186.txt.gz -------------------------------------------------------------------------------- /ai/hybrid-search-nextjs/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 | -------------------------------------------------------------------------------- /ai/inngest/rag-starter-nextjs/next.config.ts: -------------------------------------------------------------------------------- 1 | import type { NextConfig } from "next"; 2 | 3 | const nextConfig: NextConfig = { 4 | /* config options here */ 5 | }; 6 | 7 | export default nextConfig; 8 | -------------------------------------------------------------------------------- /ai/langchain/rag-nextjs/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 | -------------------------------------------------------------------------------- /ai/llamaindex/rag-nextjs/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 | -------------------------------------------------------------------------------- /auth/with-authjs-next/.prettierrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "semi": false, 3 | "printWidth": 180, 4 | "singleQuote": true, 5 | "plugins": ["prettier-plugin-tailwindcss", "prettier-plugin-organize-imports"] 6 | } 7 | -------------------------------------------------------------------------------- /auth/with-authjs-next/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 | -------------------------------------------------------------------------------- /with-analog/.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=827846 3 | "recommendations": ["angular.ng-template", "analogjs.vscode-analog"] 4 | } 5 | -------------------------------------------------------------------------------- /with-bun/using-bun-sql.ts: -------------------------------------------------------------------------------- 1 | import { sql } from 'bun'; 2 | 3 | async function getPgVersion() { 4 | const result = await sql`SELECT version()`; 5 | console.log(result[0]); 6 | } 7 | 8 | getPgVersion(); -------------------------------------------------------------------------------- /with-laravel/storage/framework/.gitignore: -------------------------------------------------------------------------------- 1 | compiled.php 2 | config.php 3 | down 4 | events.scanned.php 5 | maintenance.php 6 | routes.php 7 | routes.scanned.php 8 | schedule-* 9 | services.json 10 | -------------------------------------------------------------------------------- /with-nextjs-aws-s3/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 | -------------------------------------------------------------------------------- /with-sveltekit/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | /build 4 | /.svelte-kit 5 | /package 6 | .env 7 | .env.* 8 | !.env.example 9 | vite.config.js.timestamp-* 10 | vite.config.ts.timestamp-* 11 | -------------------------------------------------------------------------------- /ai/aws-bedrock/chatbot-nextjs/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 | -------------------------------------------------------------------------------- /ai/inngest/auto-embeddings-nextjs/next.config.ts: -------------------------------------------------------------------------------- 1 | import type { NextConfig } from "next"; 2 | 3 | const nextConfig: NextConfig = { 4 | /* config options here */ 5 | }; 6 | 7 | export default nextConfig; 8 | -------------------------------------------------------------------------------- /ai/langchain/chatbot-nextjs/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 | -------------------------------------------------------------------------------- /ai/llamaindex/chatbot-nextjs/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 | -------------------------------------------------------------------------------- /deploy-with-railway/neon-railway-example/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "module", 3 | "name": "neon-railway-example", 4 | "dependencies": { 5 | "express": "^4.19.2", 6 | "pg": "^8.12.0" 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /deploy-with-render/neon-render-example/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "module", 3 | "name": "neon-render-example", 4 | "dependencies": { 5 | "express": "^4.19.2", 6 | "pg": "^8.12.0" 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /with-fastapi/app/api/crud.py: -------------------------------------------------------------------------------- 1 | from ..db import database, playing_with_neon 2 | 3 | async def get_all_records(): 4 | query = playing_with_neon.select() 5 | return await database.fetch_all(query=query) 6 | -------------------------------------------------------------------------------- /with-nextjs-edge-functions/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 | -------------------------------------------------------------------------------- /with-nextjs-server-actions/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 | -------------------------------------------------------------------------------- /with-sveltekit-feature-flags/vite.config.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vite' 2 | import { sveltekit } from '@sveltejs/kit/vite' 3 | 4 | export default defineConfig({ 5 | plugins: [sveltekit()], 6 | }) 7 | -------------------------------------------------------------------------------- /with-waku/src/styles.css: -------------------------------------------------------------------------------- 1 | @import url('https://fonts.googleapis.com/css2?family=Nunito:ital,wght@0,400;0,700;1,400;1,700&display=swap'); 2 | @tailwind base; 3 | @tailwind components; 4 | @tailwind utilities; 5 | -------------------------------------------------------------------------------- /with_phoenix/priv/static/images/logo-06a11be1f2cdde2c851763d00bdd2e80.svg.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neondatabase/examples/HEAD/with_phoenix/priv/static/images/logo-06a11be1f2cdde2c851763d00bdd2e80.svg.gz -------------------------------------------------------------------------------- /ai/inngest/rag-starter-nextjs/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 | -------------------------------------------------------------------------------- /ai/langchain/chat-with-pdf-nextjs/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 | -------------------------------------------------------------------------------- /ai/llamaindex/chat-with-pdf-nextjs/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 | -------------------------------------------------------------------------------- /with-nextjs-get-static-props/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 | -------------------------------------------------------------------------------- /with-nextjs-server-components/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 | -------------------------------------------------------------------------------- /with-nextjs-serverless-functions/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 | -------------------------------------------------------------------------------- /with-nodejs-pg-notify/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "with-nodejs-pg-notify", 3 | "dependencies": { 4 | "@neondatabase/serverless": "^1.0.0", 5 | "dotenv": "^16.4.5", 6 | "pg": "^8.12.0" 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /with-prisma/README.md: -------------------------------------------------------------------------------- 1 | - clone this example 2 | - run `npm install` 3 | - update `DATABASE_URL` from the connection string in console in the `.env` file 4 | - run `npx prisma migrate dev --name init` to sync schema 5 | -------------------------------------------------------------------------------- /ai/inngest/auto-embeddings-nextjs/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 | -------------------------------------------------------------------------------- /ai/langchain/semantic-search-nextjs/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 | -------------------------------------------------------------------------------- /ai/llamaindex/semantic-search-nextjs/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 | -------------------------------------------------------------------------------- /with-fastapi/app/api/models.py: -------------------------------------------------------------------------------- 1 | from pydantic import BaseModel 2 | 3 | 4 | class SongSchema(BaseModel): 5 | id: int 6 | name: str 7 | value: float 8 | 9 | class SongDB(SongSchema): 10 | id: int -------------------------------------------------------------------------------- /with-fastify/routes/example/index.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | module.exports = async function (fastify, opts) { 4 | fastify.get('/', async function (request, reply) { 5 | return 'this is an example' 6 | }) 7 | } 8 | -------------------------------------------------------------------------------- /with-nextjs-drizzle-edge/next.config.js: -------------------------------------------------------------------------------- 1 | /** @type {import('next').NextConfig} */ 2 | const nextConfig = { 3 | images: { 4 | domains: ['images.ctfassets.net'], 5 | }, 6 | } 7 | 8 | module.exports = nextConfig 9 | -------------------------------------------------------------------------------- /with-nextjs-get-server-side-props/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 | -------------------------------------------------------------------------------- /with-nextjs-prisma-edge/next.config.js: -------------------------------------------------------------------------------- 1 | /** @type {import('next').NextConfig} */ 2 | const nextConfig = { 3 | images: { 4 | domains: ['images.ctfassets.net'], 5 | }, 6 | } 7 | 8 | module.exports = nextConfig 9 | -------------------------------------------------------------------------------- /with-sveltekit-feature-flags/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | /build 4 | /.svelte-kit 5 | /package 6 | .env 7 | .env.* 8 | !.env.example 9 | vite.config.js.timestamp-* 10 | vite.config.ts.timestamp-* 11 | -------------------------------------------------------------------------------- /ai/hybrid-search-nextjs/lib/utils.ts: -------------------------------------------------------------------------------- 1 | import { twMerge } from 'tailwind-merge' 2 | import { type ClassValue, clsx } from 'clsx' 3 | 4 | export function cn(...inputs: ClassValue[]) { 5 | return twMerge(clsx(inputs)) 6 | } 7 | -------------------------------------------------------------------------------- /ai/langchain/rag-nextjs/lib/utils.ts: -------------------------------------------------------------------------------- 1 | import { twMerge } from 'tailwind-merge' 2 | import { type ClassValue, clsx } from 'clsx' 3 | 4 | export function cn(...inputs: ClassValue[]) { 5 | return twMerge(clsx(inputs)) 6 | } 7 | -------------------------------------------------------------------------------- /ai/llamaindex/rag-nextjs/lib/utils.ts: -------------------------------------------------------------------------------- 1 | import { twMerge } from 'tailwind-merge' 2 | import { type ClassValue, clsx } from 'clsx' 3 | 4 | export function cn(...inputs: ClassValue[]) { 5 | return twMerge(clsx(inputs)) 6 | } 7 | -------------------------------------------------------------------------------- /ai/llamaindex/reverse-image-search-nextjs/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 | -------------------------------------------------------------------------------- /with-flask/requirements.txt: -------------------------------------------------------------------------------- 1 | blinker==1.8.2 2 | click==8.1.7 3 | Flask==3.0.3 4 | itsdangerous==2.2.0 5 | Jinja2==3.1.6 6 | MarkupSafe==2.1.5 7 | psycopg2-binary==2.9.9 8 | python-dotenv==1.0.1 9 | Werkzeug==3.0.6 10 | -------------------------------------------------------------------------------- /with-laravel/tests/TestCase.php: -------------------------------------------------------------------------------- 1 | 2 | import '../app.css' 3 | 4 | import type { PageData } from './$types' 5 | 6 | export let data: PageData 7 | 8 | 9 | {data.version} 10 | -------------------------------------------------------------------------------- /ai/aws-bedrock/chatbot-nextjs/lib/utils.ts: -------------------------------------------------------------------------------- 1 | import { twMerge } from 'tailwind-merge' 2 | import { type ClassValue, clsx } from 'clsx' 3 | 4 | export function cn(...inputs: ClassValue[]) { 5 | return twMerge(clsx(inputs)) 6 | } 7 | -------------------------------------------------------------------------------- /ai/langchain/chatbot-nextjs/lib/utils.ts: -------------------------------------------------------------------------------- 1 | import { twMerge } from 'tailwind-merge' 2 | import { type ClassValue, clsx } from 'clsx' 3 | 4 | export function cn(...inputs: ClassValue[]) { 5 | return twMerge(clsx(inputs)) 6 | } 7 | -------------------------------------------------------------------------------- /ai/llamaindex/chatbot-nextjs/lib/utils.ts: -------------------------------------------------------------------------------- 1 | import { twMerge } from 'tailwind-merge' 2 | import { type ClassValue, clsx } from 'clsx' 3 | 4 | export function cn(...inputs: ClassValue[]) { 5 | return twMerge(clsx(inputs)) 6 | } 7 | -------------------------------------------------------------------------------- /ai/langchain/chat-with-pdf-nextjs/lib/utils.ts: -------------------------------------------------------------------------------- 1 | import { twMerge } from 'tailwind-merge' 2 | import { type ClassValue, clsx } from 'clsx' 3 | 4 | export function cn(...inputs: ClassValue[]) { 5 | return twMerge(clsx(inputs)) 6 | } 7 | -------------------------------------------------------------------------------- /ai/langchain/semantic-search-nextjs/lib/utils.ts: -------------------------------------------------------------------------------- 1 | import { twMerge } from 'tailwind-merge' 2 | import { type ClassValue, clsx } from 'clsx' 3 | 4 | export function cn(...inputs: ClassValue[]) { 5 | return twMerge(clsx(inputs)) 6 | } 7 | -------------------------------------------------------------------------------- /ai/llamaindex/chat-with-pdf-nextjs/lib/utils.ts: -------------------------------------------------------------------------------- 1 | import { twMerge } from 'tailwind-merge' 2 | import { type ClassValue, clsx } from 'clsx' 3 | 4 | export function cn(...inputs: ClassValue[]) { 5 | return twMerge(clsx(inputs)) 6 | } 7 | -------------------------------------------------------------------------------- /deploy-with-cloudflare-pages/vite.config.js: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vite' 2 | import react from '@vitejs/plugin-react' 3 | 4 | // https://vitejs.dev/config/ 5 | export default defineConfig({ 6 | plugins: [react()], 7 | }) 8 | -------------------------------------------------------------------------------- /with-micronaut-kotlin/.gitignore: -------------------------------------------------------------------------------- 1 | Thumbs.db 2 | .DS_Store 3 | .gradle 4 | build/ 5 | target/ 6 | out/ 7 | .micronaut/ 8 | .idea 9 | *.iml 10 | *.ipr 11 | *.iws 12 | .project 13 | .settings 14 | .classpath 15 | .factorypath 16 | -------------------------------------------------------------------------------- /ai/llamaindex/semantic-search-nextjs/lib/utils.ts: -------------------------------------------------------------------------------- 1 | import { twMerge } from 'tailwind-merge' 2 | import { type ClassValue, clsx } from 'clsx' 3 | 4 | export function cn(...inputs: ClassValue[]) { 5 | return twMerge(clsx(inputs)) 6 | } 7 | -------------------------------------------------------------------------------- /with-nodejs/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "with-nodejs", 3 | "scripts": { 4 | "dev": "node index.js" 5 | }, 6 | "dependencies": { 7 | "@neondatabase/serverless": "^1.0.0", 8 | "dotenv": "^16.0.3" 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /with-sveltekit-feature-flags/.prettierignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | /build 4 | /.svelte-kit 5 | /package 6 | .env 7 | .env.* 8 | !.env.example 9 | vite.config.js.timestamp-* 10 | vite.config.ts.timestamp-* 11 | README.md 12 | -------------------------------------------------------------------------------- /with-sveltekit/src/postgres.server.ts: -------------------------------------------------------------------------------- 1 | import 'dotenv/config' 2 | import { neon } from '@neondatabase/serverless' 3 | 4 | const connectionString: string = process.env.DATABASE_URL as string 5 | 6 | export default neon(connectionString) 7 | -------------------------------------------------------------------------------- /ai/llamaindex/reverse-image-search-nextjs/lib/utils.ts: -------------------------------------------------------------------------------- 1 | import { twMerge } from 'tailwind-merge' 2 | import { type ClassValue, clsx } from 'clsx' 3 | 4 | export function cn(...inputs: ClassValue[]) { 5 | return twMerge(clsx(inputs)) 6 | } 7 | -------------------------------------------------------------------------------- /deploy-with-cloudflare-pages/my-neon-page/vite.config.js: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vite' 2 | import react from '@vitejs/plugin-react' 3 | 4 | // https://vitejs.dev/config/ 5 | export default defineConfig({ 6 | plugins: [react()], 7 | }) 8 | -------------------------------------------------------------------------------- /with-tanstack-start/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | package-lock.json 3 | yarn.lock 4 | 5 | .DS_Store 6 | .cache 7 | .env 8 | .vercel 9 | .output 10 | .vinxi 11 | 12 | /build/ 13 | /api/ 14 | /server/build 15 | /public/build 16 | .vinxi 17 | -------------------------------------------------------------------------------- /with-sveltekit-feature-flags/src/lib/postgres.server.ts: -------------------------------------------------------------------------------- 1 | import 'dotenv/config' 2 | import { neon } from '@neondatabase/serverless' 3 | 4 | const connectionString: string = process.env.DATABASE_URL as string 5 | 6 | export default neon(connectionString) 7 | -------------------------------------------------------------------------------- /with_elixir_postgrex/test/with_elixir_postgrex_test.exs: -------------------------------------------------------------------------------- 1 | defmodule WithElixirPostgrexTest do 2 | use ExUnit.Case 3 | doctest WithElixirPostgrex 4 | 5 | test "greets the world" do 6 | assert WithElixirPostgrex.hello() == :world 7 | end 8 | end 9 | -------------------------------------------------------------------------------- /with_phoenix/priv/static/robots.txt: -------------------------------------------------------------------------------- 1 | # See https://www.robotstxt.org/robotstxt.html for documentation on how to use the robots.txt file 2 | # 3 | # To ban all spiders from the entire site uncomment the next two lines: 4 | # User-agent: * 5 | # Disallow: / 6 | -------------------------------------------------------------------------------- /with-hono/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ESNext", 4 | "module": "ESNext", 5 | "moduleResolution": "node", 6 | "esModuleInterop": true, 7 | "skipLibCheck": true, 8 | "strict": true 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /with-micronaut-kotlin/src/main/kotlin/with/micronaut/kotlin/Application.kt: -------------------------------------------------------------------------------- 1 | package with.micronaut.kotlin 2 | 3 | import io.micronaut.runtime.Micronaut 4 | import io.micronaut.runtime.Micronaut.run 5 | fun main(args: Array) { 6 | run(*args) 7 | } 8 | -------------------------------------------------------------------------------- /with-nestjs/src/main.ts: -------------------------------------------------------------------------------- 1 | import { NestFactory } from '@nestjs/core'; 2 | import { AppModule } from './app.module'; 3 | 4 | async function bootstrap() { 5 | const app = await NestFactory.create(AppModule); 6 | await app.listen(3000); 7 | } 8 | bootstrap(); 9 | -------------------------------------------------------------------------------- /with-nestjs/test/jest-e2e.json: -------------------------------------------------------------------------------- 1 | { 2 | "moduleFileExtensions": ["js", "json", "ts"], 3 | "rootDir": ".", 4 | "testEnvironment": "node", 5 | "testRegex": ".e2e-spec.ts$", 6 | "transform": { 7 | "^.+\\.(t|j)s$": "ts-jest" 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /with-nextjs-prisma-edge/.env.example: -------------------------------------------------------------------------------- 1 | POSTGRES_PRISMA_URL="postgresql://neondb_owner:...@ep-...us-east-2.aws.neon.tech/neondb?sslmode=require" 2 | POSTGRES_URL_NON_POOLING="postgresql://neondb_owner:...@ep-...us-east-2.aws.neon.tech/neondb?sslmode=require" 3 | -------------------------------------------------------------------------------- /with-astro-api-routes/astro.config.mjs: -------------------------------------------------------------------------------- 1 | import node from "@astrojs/node"; 2 | import { defineConfig } from "astro/config"; 3 | 4 | export default defineConfig({ 5 | output: "server", 6 | adapter: node({ 7 | mode: "standalone", 8 | }), 9 | }); 10 | -------------------------------------------------------------------------------- /with_elixir_postgrex/config/config.exs.example: -------------------------------------------------------------------------------- 1 | import Config 2 | 3 | config :with_elixir_postgrex, 4 | username: "[user]", 5 | password: "[password]", 6 | hostname: "[neon_hostname]", 7 | database: "[dbname]", 8 | ssl: [cacerts: :public_key.cacerts_get()] -------------------------------------------------------------------------------- /with-laravel/.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto eol=lf 2 | 3 | *.blade.php diff=html 4 | *.css diff=css 5 | *.html diff=html 6 | *.md diff=markdown 7 | *.php diff=php 8 | 9 | /.github export-ignore 10 | CHANGELOG.md export-ignore 11 | .styleci.yml export-ignore 12 | -------------------------------------------------------------------------------- /with-nextjs-drizzle-edge/app/layout.tsx: -------------------------------------------------------------------------------- 1 | import './globals.css' 2 | 3 | export default function RootLayout({ children }: { children: React.ReactNode }) { 4 | return ( 5 | 6 | {children} 7 | 8 | ) 9 | } 10 | -------------------------------------------------------------------------------- /with-nextjs-drizzle-local-vercel/app/layout.tsx: -------------------------------------------------------------------------------- 1 | import './globals.css' 2 | 3 | export default function ({ children }: { children: React.ReactNode }) { 4 | return ( 5 | 6 | {children} 7 | 8 | ) 9 | } 10 | -------------------------------------------------------------------------------- /with-nextjs-prisma-edge/app/layout.tsx: -------------------------------------------------------------------------------- 1 | import './globals.css' 2 | 3 | export default function RootLayout({ children }: { children: React.ReactNode }) { 4 | return ( 5 | 6 | {children} 7 | 8 | ) 9 | } 10 | -------------------------------------------------------------------------------- /with-react-router/react-router.config.ts: -------------------------------------------------------------------------------- 1 | import type { Config } from "@react-router/dev/config"; 2 | 3 | export default { 4 | // Config options... 5 | // Server-side render by default, to enable SPA mode set this to `false` 6 | ssr: true, 7 | } satisfies Config; 8 | -------------------------------------------------------------------------------- /with-java-jdbc/src/main/java/com/neon/quickstart/App.java: -------------------------------------------------------------------------------- 1 | package com.neon.quickstart; 2 | 3 | /** 4 | * Hello world! 5 | */ 6 | public class App { 7 | public static void main(String[] args) { 8 | System.out.println("Hello World!"); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /with-redwoodsdk/types/css.d.ts: -------------------------------------------------------------------------------- 1 | declare module "*.module.css" { 2 | const classes: { readonly [key: string]: string }; 3 | export default classes; 4 | } 5 | 6 | declare module "*.css" {} 7 | 8 | declare module "*.css?url" { 9 | export default string; 10 | } 11 | -------------------------------------------------------------------------------- /with-tanstack-start/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "jsx": "react-jsx", 4 | "moduleResolution": "Bundler", 5 | "module": "ESNext", 6 | "target": "ES2022", 7 | "skipLibCheck": true, 8 | "strictNullChecks": true 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /with-wasp/migrations/20240624054622_test/migration.sql: -------------------------------------------------------------------------------- 1 | -- CreateTable 2 | CREATE TABLE "Task" ( 3 | "id" SERIAL NOT NULL, 4 | "description" TEXT NOT NULL, 5 | "isDone" BOOLEAN NOT NULL DEFAULT false, 6 | 7 | CONSTRAINT "Task_pkey" PRIMARY KEY ("id") 8 | ); 9 | -------------------------------------------------------------------------------- /with_phoenix/.formatter.exs: -------------------------------------------------------------------------------- 1 | [ 2 | import_deps: [:ecto, :ecto_sql, :phoenix], 3 | subdirectories: ["priv/*/migrations"], 4 | plugins: [Phoenix.LiveView.HTMLFormatter], 5 | inputs: ["*.{heex,ex,exs}", "{config,lib,test}/**/*.{heex,ex,exs}", "priv/*/seeds.exs"] 6 | ] 7 | -------------------------------------------------------------------------------- /deploy-with-heroku/neon-heroku-example/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "module", 3 | "name": "neon-heroku-example", 4 | "scripts": { 5 | "start": "node index.js" 6 | }, 7 | "dependencies": { 8 | "express": "^4.19.2", 9 | "pg": "^8.12.0" 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /with-analog/src/main.ts: -------------------------------------------------------------------------------- 1 | import 'zone.js'; 2 | import { bootstrapApplication } from '@angular/platform-browser'; 3 | 4 | import { AppComponent } from './app/app.component'; 5 | import { appConfig } from './app/app.config'; 6 | 7 | bootstrapApplication(AppComponent, appConfig); 8 | -------------------------------------------------------------------------------- /with-dotnet-entity-framework/NeonEfExample/Models/Todo.cs: -------------------------------------------------------------------------------- 1 | namespace NeonEfExample.Models 2 | { 3 | public class Todo 4 | { 5 | public int Id { get; set; } 6 | public string? Title { get; set; } 7 | public bool IsComplete { get; set; } 8 | } 9 | } -------------------------------------------------------------------------------- /with-dotnet-npgsql/NeonLibraryExample/appsettings.json.example: -------------------------------------------------------------------------------- 1 | { 2 | "ConnectionStrings": { 3 | "DefaultConnection": "Host=your-neon-host;Database=your-database;Username=your-username;Password=your-password;SSL Mode=VerifyFull; Channel Binding=Require" 4 | } 5 | } -------------------------------------------------------------------------------- /with-hyperdrive/wrangler.toml: -------------------------------------------------------------------------------- 1 | #:schema node_modules/wrangler/config-schema.json 2 | name = "with-hyperdrive" 3 | main = "src/index.ts" 4 | compatibility_date = "2024-12-05" 5 | compatibility_flags = ["nodejs_compat"] 6 | [[hyperdrive]] 7 | binding = "HYPERDRIVE" 8 | id = "..." 9 | -------------------------------------------------------------------------------- /with-laravel/routes/console.php: -------------------------------------------------------------------------------- 1 | comment(Inspiring::quote()); 8 | })->purpose('Display an inspiring quote')->hourly(); 9 | -------------------------------------------------------------------------------- /with-nextjs-drizzle-edge/drizzle.config.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'drizzle-kit' 2 | 3 | export default defineConfig({ 4 | dialect: 'postgresql', 5 | schema: './lib/schema.ts', 6 | dbCredentials: { 7 | url: process.env.POSTGRES_URL!, 8 | }, 9 | }) 10 | -------------------------------------------------------------------------------- /with-nextjs-drizzle-edge/lib/schema.ts: -------------------------------------------------------------------------------- 1 | import { pgTable, serial, text } from 'drizzle-orm/pg-core' 2 | 3 | export const usersTable = pgTable('users', { 4 | id: serial('id').primaryKey(), 5 | name: text('name'), 6 | email: text('email'), 7 | image: text('image'), 8 | }) 9 | -------------------------------------------------------------------------------- /with-nextjs-prisma-cloudflare-workers/app/layout.tsx: -------------------------------------------------------------------------------- 1 | import './globals.css' 2 | 3 | export default function RootLayout({ children }: { children: React.ReactNode }) { 4 | return ( 5 | 6 | {children} 7 | 8 | ) 9 | } 10 | -------------------------------------------------------------------------------- /with-astro/.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0.2.0", 3 | "configurations": [ 4 | { 5 | "command": "./node_modules/.bin/astro dev", 6 | "name": "Development server", 7 | "request": "launch", 8 | "type": "node-terminal" 9 | } 10 | ] 11 | } 12 | -------------------------------------------------------------------------------- /with-nextjs-drizzle-local-vercel/lib/schema.ts: -------------------------------------------------------------------------------- 1 | import { pgTable, serial, text } from 'drizzle-orm/pg-core' 2 | 3 | export const usersTable = pgTable('users', { 4 | id: serial('id').primaryKey(), 5 | name: text('name'), 6 | email: text('email'), 7 | image: text('image'), 8 | }) 9 | -------------------------------------------------------------------------------- /with-sveltekit-feature-flags/src/lib/feature_flags/set.server.ts: -------------------------------------------------------------------------------- 1 | import sql from '../postgres.server' 2 | 3 | export const setEnabled = async (flagName: string, flagValue: boolean) => { 4 | await sql`UPDATE feature_flags SET enabled = ${flagValue} WHERE flagName = ${flagName}` 5 | } 6 | -------------------------------------------------------------------------------- /with_phoenix/priv/static/robots-9e2c81b0855bbff2baa8371bc4a78186.txt: -------------------------------------------------------------------------------- 1 | # See https://www.robotstxt.org/robotstxt.html for documentation on how to use the robots.txt file 2 | # 3 | # To ban all spiders from the entire site uncomment the next two lines: 4 | # User-agent: * 5 | # Disallow: / 6 | -------------------------------------------------------------------------------- /with-angular/src/main.ts: -------------------------------------------------------------------------------- 1 | import { bootstrapApplication } from '@angular/platform-browser'; 2 | import { appConfig } from './app/app.config'; 3 | import { AppComponent } from './app/app.component'; 4 | 5 | bootstrapApplication(AppComponent, appConfig) 6 | .catch((err) => console.error(err)); 7 | -------------------------------------------------------------------------------- /with-electricsql/react-app/src/main.tsx: -------------------------------------------------------------------------------- 1 | import { StrictMode } from "react"; 2 | import { createRoot } from "react-dom/client"; 3 | import App from "./App.tsx"; 4 | 5 | createRoot(document.getElementById("root")!).render( 6 | 7 | 8 | 9 | ); 10 | -------------------------------------------------------------------------------- /with-ruby/index.rb: -------------------------------------------------------------------------------- 1 | require 'pg' 2 | require 'dotenv' 3 | 4 | Dotenv.load 5 | 6 | conn = PG.connect(ENV['DATABASE_URL']) 7 | res = conn.exec("SELECT * FROM playing_with_neon;") 8 | 9 | res.each do |row| 10 | puts "%s | %s | %s" % row.values_at('id', 'name', 'value') 11 | end 12 | -------------------------------------------------------------------------------- /with-wasp/src/queries.ts: -------------------------------------------------------------------------------- 1 | import { Task } from 'wasp/entities' 2 | import { type GetTasks } from 'wasp/server/operations' 3 | 4 | export const getTasks: GetTasks = async (args, context) => { 5 | return context.entities.Task.findMany({ 6 | orderBy: { id: 'asc' }, 7 | }) 8 | } -------------------------------------------------------------------------------- /ai/hybrid-search-nextjs/.env.example: -------------------------------------------------------------------------------- 1 | # Postgres URL retrieved here: https://console.neon.tech 2 | POSTGRES_URL="postgresql://neondb_owner:...@ep-...us-east-1.aws.neon.tech/neondb?sslmode=require" 3 | 4 | # OpenAI key retrieved here: https://platform.openai.com/api-keys 5 | OPENAI_API_KEY="sk-..." 6 | -------------------------------------------------------------------------------- /ai/llamaindex/chat-with-pdf-nextjs/lib/vectorStore.ts: -------------------------------------------------------------------------------- 1 | import { PGVectorStore } from 'llamaindex/storage/vectorStore/PGVectorStore' 2 | 3 | const vectorStore = new PGVectorStore({ 4 | dimensions: 1536, 5 | connectionString: process.env.POSTGRES_URL, 6 | }) 7 | 8 | export default vectorStore 9 | -------------------------------------------------------------------------------- /with-nextjs-prisma-cloudflare-workers/.env.example: -------------------------------------------------------------------------------- 1 | # Unpooled Connection URL 2 | POSTGRES_PRISMA_URL="postgresql://neondb_owner:...@ep-...us-east-2.aws.neon.tech/neondb?sslmode=require" 3 | POSTGRES_URL_NON_POOLING="postgresql://neondb_owner:...@ep-...us-east-2.aws.neon.tech/neondb?sslmode=require" 4 | -------------------------------------------------------------------------------- /with-react-router/app/app.css: -------------------------------------------------------------------------------- 1 | @import "tailwindcss"; 2 | 3 | @theme { 4 | --font-sans: "Inter", ui-sans-serif, system-ui, sans-serif, 5 | "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; 6 | } 7 | 8 | html, 9 | body { 10 | @apply bg-gray-950; 11 | } 12 | -------------------------------------------------------------------------------- /with-rust-cloudflare-workers/wrangler.toml: -------------------------------------------------------------------------------- 1 | name = "tokio-postgres-on-workers-with-neon" 2 | main = "build/worker/shim.mjs" 3 | compatibility_date = "2024-05-01" 4 | 5 | [vars] 6 | POSGTRES_URL="..." 7 | 8 | [build] 9 | command = "cargo install -q worker-build && worker-build --release" 10 | -------------------------------------------------------------------------------- /ai/llamaindex/reverse-image-search-nextjs/lib/vectorStore.ts: -------------------------------------------------------------------------------- 1 | import { PGVectorStore } from 'llamaindex/storage/vectorStore/PGVectorStore' 2 | 3 | const vectorStore = new PGVectorStore({ 4 | dimensions: 512, 5 | connectionString: process.env.POSTGRES_URL, 6 | }) 7 | 8 | export default vectorStore 9 | -------------------------------------------------------------------------------- /deploy-with-cloudflare-workers/my-neon-worker/.editorconfig: -------------------------------------------------------------------------------- 1 | # http://editorconfig.org 2 | root = true 3 | 4 | [*] 5 | indent_style = tab 6 | end_of_line = lf 7 | charset = utf-8 8 | trim_trailing_whitespace = true 9 | insert_final_newline = true 10 | 11 | [*.yml] 12 | indent_style = space 13 | -------------------------------------------------------------------------------- /with-astro-api-routes/.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0.2.0", 3 | "configurations": [ 4 | { 5 | "command": "./node_modules/.bin/astro dev", 6 | "name": "Development server", 7 | "request": "launch", 8 | "type": "node-terminal" 9 | } 10 | ] 11 | } 12 | -------------------------------------------------------------------------------- /with-tanstack-start/app/app.css: -------------------------------------------------------------------------------- 1 | @import "tailwindcss"; 2 | 3 | @theme { 4 | --font-sans: "Inter", ui-sans-serif, system-ui, sans-serif, 5 | "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; 6 | } 7 | 8 | html, 9 | body { 10 | @apply bg-gray-950; 11 | } 12 | -------------------------------------------------------------------------------- /ai/langchain/semantic-search-nextjs/.env.example: -------------------------------------------------------------------------------- 1 | # Postgres URL retrieved here: https://console.neon.tech 2 | POSTGRES_URL="postgresql://neondb_owner:...@ep-...us-east-1.aws.neon.tech/neondb?sslmode=require" 3 | 4 | # OpenAI key retrieved here: https://platform.openai.com/api-keys 5 | OPENAI_API_KEY="sk-..." 6 | -------------------------------------------------------------------------------- /with-electricsql/docker-compose.yaml: -------------------------------------------------------------------------------- 1 | version: "3.3" 2 | name: "electric_quickstart" 3 | services: 4 | electric: 5 | image: electricsql/electric 6 | environment: 7 | DATABASE_URL: postgresql://neondb_owner:***@ep-***.us-east-1.aws.neon.tech/neondb?sslmode=require 8 | ports: 9 | - "3000:3000" -------------------------------------------------------------------------------- /with-nextjs-aws-s3/.env.example: -------------------------------------------------------------------------------- 1 | # AWS Environment Variables 2 | AWS_KEY_ID="..." 3 | AWS_SECRET_ACCESS_KEY=".../...+" 4 | AWS_S3_BUCKET_NAME="...-bucket-0" 5 | 6 | # Postgres (powered by Neon) Environment Variable 7 | DATABASE_URL="postgresql://neondb_owner:...@...us-east-1.aws.neon.tech/neondb?sslmode=require" 8 | -------------------------------------------------------------------------------- /with-nuxt/server/api/version.get.ts: -------------------------------------------------------------------------------- 1 | import { neon } from "@neondatabase/serverless"; 2 | 3 | export default defineCachedEventHandler((event) => { 4 | const { databaseUrl } = useRuntimeConfig(event) 5 | const db = neon(databaseUrl); 6 | return db('SELECT version()'); 7 | }, { 8 | maxAge: 60 * 60 * 24, 9 | }) -------------------------------------------------------------------------------- /with-sveltekit-feature-flags/src/lib/feature_flags/get.server.ts: -------------------------------------------------------------------------------- 1 | import sql from '../postgres.server' 2 | 3 | export const isEnabled = async (flagName: string): Promise => { 4 | const rows = await sql`SELECT enabled FROM feature_flags WHERE flagName = ${flagName}` 5 | return rows[0].enabled 6 | } 7 | -------------------------------------------------------------------------------- /ai/llamaindex/reverse-image-search-nextjs/.env.example: -------------------------------------------------------------------------------- 1 | # Postgres URL retrieved here: https://console.neon.tech 2 | POSTGRES_URL="postgresql://neondb_owner:...@ep-...us-east-1.aws.neon.tech/neondb?sslmode=require" 3 | 4 | # OpenAI key retrieved here: https://platform.openai.com/api-keys 5 | OPENAI_API_KEY="sk-..." 6 | -------------------------------------------------------------------------------- /with-angular/src/main.server.ts: -------------------------------------------------------------------------------- 1 | import { bootstrapApplication } from '@angular/platform-browser'; 2 | import { AppComponent } from './app/app.component'; 3 | import { config } from './app/app.config.server'; 4 | 5 | const bootstrap = () => bootstrapApplication(AppComponent, config); 6 | 7 | export default bootstrap; 8 | -------------------------------------------------------------------------------- /ai/inngest/rag-starter-nextjs/src/app/api/inngest/route.ts: -------------------------------------------------------------------------------- 1 | import { serve } from "inngest/next"; 2 | import { inngest } from "@/inngest/client"; 3 | import { processDocument } from "@/inngest/functions"; 4 | 5 | export const { GET, POST, PUT } = serve({ 6 | client: inngest, 7 | functions: [processDocument], 8 | }); 9 | -------------------------------------------------------------------------------- /deploy-with-cloudflare-pages/src/main.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import ReactDOM from 'react-dom/client' 3 | import App from './App.jsx' 4 | import './index.css' 5 | 6 | ReactDOM.createRoot(document.getElementById('root')).render( 7 | 8 | 9 | , 10 | ) 11 | -------------------------------------------------------------------------------- /with-analog/src/app/app.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | import { RouterOutlet } from '@angular/router'; 3 | 4 | @Component({ 5 | selector: 'app-root', 6 | standalone: true, 7 | imports: [RouterOutlet], 8 | template: ``, 9 | }) 10 | export class AppComponent {} 11 | -------------------------------------------------------------------------------- /with-analog/src/main.server.ts: -------------------------------------------------------------------------------- 1 | import 'zone.js/node'; 2 | import '@angular/platform-server/init'; 3 | import { render } from '@analogjs/router/server'; 4 | 5 | import { AppComponent } from './app/app.component'; 6 | import { config } from './app/app.config.server'; 7 | 8 | export default render(AppComponent, config); 9 | -------------------------------------------------------------------------------- /with-sveltekit/src/routes/+page.server.ts: -------------------------------------------------------------------------------- 1 | import sql from '../postgres.server' 2 | 3 | /** @type {import('./$types').LayoutServerLoad} */ 4 | export async function load({}) { 5 | const response = await sql`SELECT version()`; 6 | const { version } = response[0] 7 | return { 8 | version 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /with-hono/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "with-hono", 3 | "scripts": { 4 | "start": "vercel dev", 5 | "deploy": "vercel" 6 | }, 7 | "dependencies": { 8 | "@neondatabase/serverless": "^1.0.0", 9 | "hono": "^4.4.2" 10 | }, 11 | "devDependencies": { 12 | "vercel": "^32.4.1" 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /with-bun/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "module", 3 | "name": "with-bun", 4 | "module": "index.ts", 5 | "devDependencies": { 6 | "@types/bun": "latest" 7 | }, 8 | "peerDependencies": { 9 | "typescript": "^5.0.0" 10 | }, 11 | "dependencies": { 12 | "@neondatabase/serverless": "^1.0.0" 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /with-laravel/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "private": true, 3 | "type": "module", 4 | "scripts": { 5 | "dev": "vite", 6 | "build": "vite build" 7 | }, 8 | "devDependencies": { 9 | "axios": "^1.6.4", 10 | "laravel-vite-plugin": "^1.0", 11 | "vite": "^5.0" 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /with-nuxt/.gitignore: -------------------------------------------------------------------------------- 1 | # Nuxt dev/build outputs 2 | .output 3 | .data 4 | .nuxt 5 | .nitro 6 | .cache 7 | dist 8 | 9 | # Node dependencies 10 | node_modules 11 | 12 | # Logs 13 | logs 14 | *.log 15 | 16 | # Misc 17 | .DS_Store 18 | .fleet 19 | .idea 20 | 21 | # Local env files 22 | .env 23 | .env.* 24 | !.env.example 25 | -------------------------------------------------------------------------------- /with-tanstack-start/app/client.tsx: -------------------------------------------------------------------------------- 1 | /// 2 | import { hydrateRoot } from "react-dom/client"; 3 | import { StartClient } from "@tanstack/start"; 4 | import { createRouter } from "./router"; 5 | 6 | const router = createRouter(); 7 | 8 | hydrateRoot(document, ); 9 | -------------------------------------------------------------------------------- /with_phoenix/lib/with_phoenix.ex: -------------------------------------------------------------------------------- 1 | defmodule WithPhoenix do 2 | @moduledoc """ 3 | WithPhoenix keeps the contexts that define your domain 4 | and business logic. 5 | 6 | Contexts are also responsible for managing your data, regardless 7 | if it comes from the database, an external API or others. 8 | """ 9 | end 10 | -------------------------------------------------------------------------------- /with_phoenix/test/with_phoenix_web/controllers/page_controller_test.exs: -------------------------------------------------------------------------------- 1 | defmodule WithPhoenixWeb.PageControllerTest do 2 | use WithPhoenixWeb.ConnCase 3 | 4 | test "GET /", %{conn: conn} do 5 | conn = get(conn, ~p"/") 6 | assert html_response(conn, 200) =~ "Peace of mind from prototype to production" 7 | end 8 | end 9 | -------------------------------------------------------------------------------- /deploy-with-cloudflare-pages/my-neon-page/src/main.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import ReactDOM from 'react-dom/client' 3 | import App from './App.jsx' 4 | import './index.css' 5 | 6 | ReactDOM.createRoot(document.getElementById('root')).render( 7 | 8 | 9 | , 10 | ) 11 | -------------------------------------------------------------------------------- /deploy-with-cloudflare-workers/my-neon-worker/vitest.config.js: -------------------------------------------------------------------------------- 1 | import { defineWorkersConfig } from '@cloudflare/vitest-pool-workers/config'; 2 | 3 | export default defineWorkersConfig({ 4 | test: { 5 | poolOptions: { 6 | workers: { 7 | wrangler: { configPath: './wrangler.toml' }, 8 | }, 9 | }, 10 | }, 11 | }); 12 | -------------------------------------------------------------------------------- /with-express/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "with-express", 3 | "scripts": { 4 | "dev": "nodemon src/index.js" 5 | }, 6 | "dependencies": { 7 | "@neondatabase/serverless": "^1.0.0", 8 | "cors": "^2.8.5", 9 | "dotenv": "^16.0.3", 10 | "express": "^4.17.2", 11 | "nodemon": "^2.0.15" 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /with-fastapi/app/api/songs.py: -------------------------------------------------------------------------------- 1 | from typing import List 2 | 3 | from fastapi import APIRouter 4 | 5 | from .crud import get_all_records 6 | from .models import SongDB 7 | 8 | router = APIRouter() 9 | 10 | @router.get("/", response_model=List[SongDB]) 11 | async def read_all_records(): 12 | return await get_all_records() 13 | -------------------------------------------------------------------------------- /with-micronaut-kotlin/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-bin.zip 4 | networkTimeout=10000 5 | validateDistributionUrl=true 6 | zipStoreBase=GRADLE_USER_HOME 7 | zipStorePath=wrapper/dists 8 | -------------------------------------------------------------------------------- /with-nextjs-prisma/tailwind.config.js: -------------------------------------------------------------------------------- 1 | /** @type {import('tailwindcss').Config} */ 2 | module.exports = { 3 | content: [ 4 | './app/**/*.{js,ts,jsx,tsx}', 5 | './pages/**/*.{js,ts,jsx,tsx}', 6 | './components/**/*.{js,ts,jsx,tsx}', 7 | ], 8 | theme: { 9 | extend: {}, 10 | }, 11 | plugins: [], 12 | }; 13 | -------------------------------------------------------------------------------- /with-rust-cloudflare-workers/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "tokio-postgres-on-workers-with-neon", 3 | "scripts": { 4 | "dev": "wrangler dev", 5 | "deploy": "wrangler deploy" 6 | }, 7 | "devDependencies": { 8 | "wrangler": "^2.13.0" 9 | }, 10 | "dependencies": { 11 | "@neondatabase/serverless": "^1.0.0" 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /with-sequelize/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "with-sequelize", 3 | "scripts": { 4 | "test": "node index.js" 5 | }, 6 | "dependencies": { 7 | "@neondatabase/serverless": "^1.0.0", 8 | "dotenv": "^16.4.5", 9 | "pg": "^8.12.0", 10 | "pg-hstore": "^2.3.4", 11 | "sequelize": "^6.37.3" 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /with-express/src/api/index.js: -------------------------------------------------------------------------------- 1 | const express = require("express"); 2 | 3 | const router = express.Router(); 4 | const todos = require("./todos"); 5 | 6 | router.get("/", (_, res) => { 7 | res.json({ 8 | message: "Welcome to API 🚀", 9 | }); 10 | }); 11 | 12 | router.use("/todos", todos); 13 | 14 | module.exports = router; 15 | -------------------------------------------------------------------------------- /with-laravel/vite.config.js: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vite'; 2 | import laravel from 'laravel-vite-plugin'; 3 | 4 | export default defineConfig({ 5 | plugins: [ 6 | laravel({ 7 | input: ['resources/css/app.css', 'resources/js/app.js'], 8 | refresh: true, 9 | }), 10 | ], 11 | }); 12 | -------------------------------------------------------------------------------- /with_phoenix/lib/with_phoenix_web/controllers/page_controller.ex: -------------------------------------------------------------------------------- 1 | defmodule WithPhoenixWeb.PageController do 2 | use WithPhoenixWeb, :controller 3 | 4 | def home(conn, _params) do 5 | # The home page is often custom made, 6 | # so skip the default app layout. 7 | render(conn, :home, layout: false) 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /ai/inngest/rag-starter-nextjs/src/inngest/client.ts: -------------------------------------------------------------------------------- 1 | import { Inngest } from "inngest"; 2 | 3 | export const inngest = new Inngest({ id: "RAG App" }); 4 | 5 | // Define event types 6 | export type ProcessDocumentEvent = { 7 | name: "document/process"; 8 | data: { 9 | title: string; 10 | content: string; 11 | }; 12 | }; 13 | -------------------------------------------------------------------------------- /with-prisma/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "with-prisma", 3 | "devDependencies": { 4 | "@types/node": "^22.0.2", 5 | "prisma": "^5.17.0", 6 | "ts-node": "^10.9.2", 7 | "typescript": "^5.5.4" 8 | }, 9 | "dependencies": { 10 | "@neondatabase/serverless": "^1.0.0", 11 | "@prisma/client": "^5.17.0" 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /with_phoenix/lib/with_phoenix_web/controllers/page_html.ex: -------------------------------------------------------------------------------- 1 | defmodule WithPhoenixWeb.PageHTML do 2 | @moduledoc """ 3 | This module contains pages rendered by PageController. 4 | 5 | See the `page_html` directory for all templates available. 6 | """ 7 | use WithPhoenixWeb, :html 8 | 9 | embed_templates "page_html/*" 10 | end 11 | -------------------------------------------------------------------------------- /with-analog/src/app/pages/index.server.ts: -------------------------------------------------------------------------------- 1 | import { neon } from '@neondatabase/serverless' 2 | import { PageServerLoad } from '@analogjs/router'; 3 | 4 | const sql = neon(import.meta.env.DATABASE_URL) 5 | 6 | export const load = async ({}: PageServerLoad) => { 7 | const response = await sql`SELECT version()` 8 | return response[0] 9 | }; 10 | -------------------------------------------------------------------------------- /with-analog/src/server/routes/v1/hello.ts: -------------------------------------------------------------------------------- 1 | import { defineEventHandler } from 'h3'; 2 | import { neon } from '@neondatabase/serverless' 3 | 4 | const sql = neon(import.meta.env.DATABASE_URL) 5 | 6 | export default defineEventHandler(async () => { 7 | const response = await sql`SELECT version()` 8 | return response[0]['version'] 9 | }); 10 | -------------------------------------------------------------------------------- /with-astro-api-routes/src/pages/api/version.ts: -------------------------------------------------------------------------------- 1 | import type { APIRoute } from "astro"; 2 | import { neon } from "@neondatabase/serverless"; 3 | 4 | export const POST: APIRoute = async ({}) => { 5 | const sql = neon(import.meta.env.DATABASE_URL); 6 | const response = await sql`SELECT version()`; 7 | return new Response(response[0].version); 8 | }; 9 | -------------------------------------------------------------------------------- /with-redwoodsdk/vite.config.mts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from "vite"; 2 | import { redwood } from "rwsdk/vite"; 3 | import { cloudflare } from "@cloudflare/vite-plugin"; 4 | 5 | export default defineConfig({ 6 | plugins: [ 7 | cloudflare({ 8 | viteEnvironment: { name: "worker" }, 9 | }), 10 | redwood(), 11 | ], 12 | }); 13 | -------------------------------------------------------------------------------- /with-electricsql/react-app/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /with-laravel/tests/Unit/ExampleTest.php: -------------------------------------------------------------------------------- 1 | assertTrue(true); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /with-nuxt/app/app.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 14 | -------------------------------------------------------------------------------- /with_reflex/rxconfig.py: -------------------------------------------------------------------------------- 1 | import os 2 | from dotenv import load_dotenv 3 | import reflex as rx 4 | 5 | load_dotenv() 6 | 7 | config = rx.Config( 8 | app_name="with_reflex", 9 | plugins=[ 10 | rx.plugins.SitemapPlugin(), 11 | rx.plugins.TailwindV4Plugin(), 12 | ], 13 | db_url=os.environ.get("DATABASE_URL"), 14 | ) 15 | -------------------------------------------------------------------------------- /ai/hybrid-search-nextjs/next.config.mjs: -------------------------------------------------------------------------------- 1 | /** @type {import('next').NextConfig} */ 2 | const nextConfig = { 3 | webpack: (config) => { 4 | config.resolve.alias = { 5 | ...config.resolve.alias, 6 | sharp$: false, 7 | 'onnxruntime-node$': false, 8 | } 9 | return config 10 | }, 11 | } 12 | 13 | export default nextConfig 14 | -------------------------------------------------------------------------------- /ai/llamaindex/rag-nextjs/next.config.mjs: -------------------------------------------------------------------------------- 1 | /** @type {import('next').NextConfig} */ 2 | const nextConfig = { 3 | webpack: (config) => { 4 | config.resolve.alias = { 5 | ...config.resolve.alias, 6 | sharp$: false, 7 | 'onnxruntime-node$': false, 8 | } 9 | return config 10 | }, 11 | } 12 | 13 | export default nextConfig 14 | -------------------------------------------------------------------------------- /with-nestjs/src/app.service.ts: -------------------------------------------------------------------------------- 1 | import { Injectable, Inject } from '@nestjs/common'; 2 | 3 | @Injectable() 4 | export class AppService { 5 | constructor(@Inject('POSTGRES_POOL') private readonly sql: any) {} 6 | 7 | async getTable(name: string): Promise { 8 | return await this.sql`SELECT * FROM ${this.sql.unsafe(name)}`; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /ai/aws-bedrock/chatbot-nextjs/next.config.mjs: -------------------------------------------------------------------------------- 1 | /** @type {import('next').NextConfig} */ 2 | const nextConfig = { 3 | webpack: (config) => { 4 | config.resolve.alias = { 5 | ...config.resolve.alias, 6 | sharp$: false, 7 | 'onnxruntime-node$': false, 8 | } 9 | return config 10 | }, 11 | } 12 | 13 | export default nextConfig 14 | -------------------------------------------------------------------------------- /ai/llamaindex/chatbot-nextjs/next.config.mjs: -------------------------------------------------------------------------------- 1 | /** @type {import('next').NextConfig} */ 2 | const nextConfig = { 3 | webpack: (config) => { 4 | config.resolve.alias = { 5 | ...config.resolve.alias, 6 | sharp$: false, 7 | 'onnxruntime-node$': false, 8 | } 9 | return config 10 | }, 11 | } 12 | 13 | export default nextConfig 14 | -------------------------------------------------------------------------------- /with-fastify/plugins/support.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | const fp = require('fastify-plugin') 4 | 5 | // the use of fastify-plugin is required to be able 6 | // to export the decorators to the outer scope 7 | 8 | module.exports = fp(async function (fastify, opts) { 9 | fastify.decorate('someSupport', function () { 10 | return 'hugs' 11 | }) 12 | }) 13 | -------------------------------------------------------------------------------- /with-sveltekit/src/app.d.ts: -------------------------------------------------------------------------------- 1 | // See https://kit.svelte.dev/docs/types#app 2 | // for information about these interfaces 3 | declare global { 4 | namespace App { 5 | // interface Error {} 6 | // interface Locals {} 7 | // interface PageData {} 8 | // interface PageState {} 9 | // interface Platform {} 10 | } 11 | } 12 | 13 | export {} 14 | -------------------------------------------------------------------------------- /with_elixir_postgrex/lib/with_elixir_postgrex.ex: -------------------------------------------------------------------------------- 1 | defmodule WithElixirPostgrex do 2 | @moduledoc """ 3 | Documentation for `WithElixirPostgrex`. 4 | """ 5 | 6 | @doc """ 7 | Hello world. 8 | 9 | ## Examples 10 | 11 | iex> WithElixirPostgrex.hello() 12 | :world 13 | 14 | """ 15 | def hello do 16 | :world 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /ai/llamaindex/chat-with-pdf-nextjs/next.config.mjs: -------------------------------------------------------------------------------- 1 | /** @type {import('next').NextConfig} */ 2 | const nextConfig = { 3 | webpack: (config) => { 4 | config.resolve.alias = { 5 | ...config.resolve.alias, 6 | sharp$: false, 7 | 'onnxruntime-node$': false, 8 | } 9 | return config 10 | }, 11 | } 12 | 13 | export default nextConfig 14 | -------------------------------------------------------------------------------- /ai/llamaindex/semantic-search-nextjs/next.config.mjs: -------------------------------------------------------------------------------- 1 | /** @type {import('next').NextConfig} */ 2 | const nextConfig = { 3 | webpack: (config) => { 4 | config.resolve.alias = { 5 | ...config.resolve.alias, 6 | sharp$: false, 7 | 'onnxruntime-node$': false, 8 | } 9 | return config 10 | }, 11 | } 12 | 13 | export default nextConfig 14 | -------------------------------------------------------------------------------- /with-electricsql/react-app/src/App.tsx: -------------------------------------------------------------------------------- 1 | import { useShape } from "@electric-sql/react"; 2 | 3 | function Component() { 4 | const { data } = useShape({ 5 | url: `http://localhost:3000/v1/shape/foo`, 6 | }); 7 | return ( 8 | <> 9 |
{JSON.stringify(data, null, 2)}
; 10 | 11 | ); 12 | } 13 | 14 | export default Component; 15 | -------------------------------------------------------------------------------- /with-fastify/routes/root.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | module.exports = async function (fastify, opts) { 4 | fastify.get("/", function (req, reply) { 5 | fastify.pg.query( 6 | "SELECT * FROM playing_with_neon", 7 | [], 8 | function onResult(err, result) { 9 | reply.send(err || result.rows); 10 | } 11 | ); 12 | }); 13 | }; 14 | -------------------------------------------------------------------------------- /with-laravel/.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | end_of_line = lf 6 | indent_size = 4 7 | indent_style = space 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | 11 | [*.md] 12 | trim_trailing_whitespace = false 13 | 14 | [*.{yml,yaml}] 15 | indent_size = 2 16 | 17 | [docker-compose.yml] 18 | indent_size = 4 19 | -------------------------------------------------------------------------------- /with-analog/.editorconfig: -------------------------------------------------------------------------------- 1 | # Editor configuration, see https://editorconfig.org 2 | root = true 3 | 4 | [*] 5 | charset = utf-8 6 | indent_style = space 7 | indent_size = 2 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | 11 | [*.ts] 12 | quote_type = single 13 | 14 | [*.md] 15 | max_line_length = off 16 | trim_trailing_whitespace = false 17 | -------------------------------------------------------------------------------- /with-angular/.editorconfig: -------------------------------------------------------------------------------- 1 | # Editor configuration, see https://editorconfig.org 2 | root = true 3 | 4 | [*] 5 | charset = utf-8 6 | indent_style = space 7 | indent_size = 2 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | 11 | [*.ts] 12 | quote_type = single 13 | 14 | [*.md] 15 | max_line_length = off 16 | trim_trailing_whitespace = false 17 | -------------------------------------------------------------------------------- /with-laravel/.gitignore: -------------------------------------------------------------------------------- 1 | /.phpunit.cache 2 | /node_modules 3 | /public/build 4 | /public/hot 5 | /public/storage 6 | /storage/*.key 7 | /vendor 8 | .env 9 | .env.backup 10 | .env.production 11 | .phpactor.json 12 | .phpunit.result.cache 13 | Homestead.json 14 | Homestead.yaml 15 | auth.json 16 | npm-debug.log 17 | yarn-error.log 18 | /.fleet 19 | /.idea 20 | /.vscode 21 | -------------------------------------------------------------------------------- /with-micronaut-kotlin/src/main/resources/db/migration/V1__create_book_table.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE IF NOT EXISTS book ( 2 | id SERIAL PRIMARY KEY, 3 | title VARCHAR(255) NOT NULL, 4 | author VARCHAR(255) NOT NULL 5 | ); 6 | 7 | INSERT INTO book (title, author) VALUES ('The Hobbit', 'J.R.R. Tolkien'); 8 | INSERT INTO book (title, author) VALUES ('1984', 'George Orwell'); 9 | -------------------------------------------------------------------------------- /with-sveltekit/src/app.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | %sveltekit.head% 7 | 8 | 9 |
%sveltekit.body%
10 | 11 | 12 | -------------------------------------------------------------------------------- /with-wasp/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "with-wasp", 3 | "dependencies": { 4 | "@neondatabase/serverless": "^1.0.0", 5 | "react": "^18.2.0", 6 | "wasp": "file:.wasp/out/sdk/wasp" 7 | }, 8 | "devDependencies": { 9 | "@types/react": "^18.0.37", 10 | "prisma": "4.16.2", 11 | "typescript": "^5.1.0", 12 | "vite": "^4.3.9" 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /auth/with-authjs-next/.env.example: -------------------------------------------------------------------------------- 1 | # Postgres URL retrieved from https://console.neon.tech 2 | DATABASE_URL="postgresql://neondb_owner:...@ep-...us-east-1.aws.neon.tech/neondb?sslmode=require" 3 | 4 | # API key generated at https://resend.com/api-keys 5 | AUTH_RESEND_KEY="YOUR_RESEND_API_KEY" 6 | 7 | # Secret generated using `npx auth secret` 8 | AUTH_SECRET="YOUR_AUTH_SECRET" 9 | -------------------------------------------------------------------------------- /with-nestjs/src/app.controller.ts: -------------------------------------------------------------------------------- 1 | import { Controller, Get } from '@nestjs/common'; 2 | import { AppService } from './app.service'; 3 | 4 | @Controller('/') 5 | export class AppController { 6 | constructor(private readonly appService: AppService) {} 7 | 8 | @Get() 9 | async getTable() { 10 | return this.appService.getTable('playing_with_neon'); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /with-nuxt/nuxt.config.ts: -------------------------------------------------------------------------------- 1 | export default defineNuxtConfig({ 2 | compatibilityDate: '2024-04-03', 3 | devtools: { 4 | enabled: true, 5 | }, 6 | future: { 7 | compatibilityVersion: 4 8 | }, 9 | modules: [ 10 | '@nuxtjs/tailwindcss', 11 | '@nuxt/icon', 12 | ], 13 | runtimeConfig: { 14 | databaseUrl: process.env.DATABASE_URL, 15 | }, 16 | }) -------------------------------------------------------------------------------- /with-sveltekit-feature-flags/src/app.d.ts: -------------------------------------------------------------------------------- 1 | // See https://kit.svelte.dev/docs/types#app 2 | // for information about these interfaces 3 | declare global { 4 | namespace App { 5 | // interface Error {} 6 | // interface Locals {} 7 | // interface PageData {} 8 | // interface PageState {} 9 | // interface Platform {} 10 | } 11 | } 12 | 13 | export {} 14 | -------------------------------------------------------------------------------- /with-angular/src/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | WithAngular 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /with-fastapi/main.py: -------------------------------------------------------------------------------- 1 | from fastapi import FastAPI 2 | 3 | from app.api import songs 4 | from app.db import database 5 | 6 | app = FastAPI() 7 | 8 | @app.on_event("startup") 9 | async def startup(): 10 | await database.connect() 11 | 12 | @app.on_event("shutdown") 13 | async def shutdown(): 14 | await database.disconnect() 15 | 16 | app.include_router(songs.router) 17 | -------------------------------------------------------------------------------- /with-nextjs-drizzle-local-vercel/tailwind.config.js: -------------------------------------------------------------------------------- 1 | /** @type {import('tailwindcss').Config} */ 2 | module.exports = { 3 | content: ['./pages/**/*.{js,ts,jsx,tsx}', './components/**/*.{js,ts,jsx,tsx}', './app/**/*.{js,ts,jsx,tsx}'], 4 | theme: { 5 | extend: { 6 | fontFamily: { 7 | default: ['var(--font-inter)'], 8 | }, 9 | }, 10 | }, 11 | } 12 | -------------------------------------------------------------------------------- /with-tanstack-start/app/ssr.tsx: -------------------------------------------------------------------------------- 1 | import { 2 | createStartHandler, 3 | defaultStreamHandler, 4 | } from "@tanstack/start/server"; 5 | import { getRouterManifest } from "@tanstack/start/router-manifest"; 6 | 7 | import { createRouter } from "./router"; 8 | 9 | export default createStartHandler({ 10 | createRouter, 11 | getRouterManifest, 12 | })(defaultStreamHandler); 13 | -------------------------------------------------------------------------------- /ai/langchain/rag-nextjs/.env.example: -------------------------------------------------------------------------------- 1 | # Postgres URL retrieved here: https://console.neon.tech 2 | POSTGRES_URL="postgresql://neondb_owner:...@ep-...us-east-1.aws.neon.tech/neondb?sslmode=require" 3 | 4 | # OpenAI key retrieved here: https://platform.openai.com/api-keys 5 | OPENAI_API_KEY="sk-..." 6 | 7 | # If want to use Ollama as LLM (OpenAI API key still needed) 8 | OLLAMA_ENDPOINT="" 9 | -------------------------------------------------------------------------------- /ai/llamaindex/rag-nextjs/.env.example: -------------------------------------------------------------------------------- 1 | # Postgres URL retrieved here: https://console.neon.tech 2 | POSTGRES_URL="postgresql://neondb_owner:...@ep-...us-east-1.aws.neon.tech/neondb?sslmode=require" 3 | 4 | # OpenAI key retrieved here: https://platform.openai.com/api-keys 5 | OPENAI_API_KEY="sk-..." 6 | 7 | # If want to use Ollama as LLM (OpenAI API key still needed) 8 | OLLAMA_ENDPOINT="" 9 | -------------------------------------------------------------------------------- /with-analog/.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 3 | "version": "0.2.0", 4 | "configurations": [ 5 | { 6 | "name": "ng serve", 7 | "type": "chrome", 8 | "request": "launch", 9 | "preLaunchTask": "npm: start", 10 | "url": "http://localhost:5173/" 11 | } 12 | ] 13 | } 14 | -------------------------------------------------------------------------------- /with-nextjs-prisma-cloudflare-workers/tailwind.config.js: -------------------------------------------------------------------------------- 1 | /** @type {import('tailwindcss').Config} */ 2 | module.exports = { 3 | content: ['./pages/**/*.{js,ts,jsx,tsx}', './components/**/*.{js,ts,jsx,tsx}', './app/**/*.{js,ts,jsx,tsx}'], 4 | theme: { 5 | extend: { 6 | fontFamily: { 7 | default: ['var(--font-inter)'], 8 | }, 9 | }, 10 | }, 11 | } 12 | -------------------------------------------------------------------------------- /with-sveltekit-feature-flags/src/app.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | %sveltekit.head% 7 | 8 | 9 |
%sveltekit.body%
10 | 11 | 12 | -------------------------------------------------------------------------------- /ai/langchain/chatbot-nextjs/.env.example: -------------------------------------------------------------------------------- 1 | # Postgres URL retrieved here: https://console.neon.tech 2 | POSTGRES_URL="postgresql://neondb_owner:...@ep-...us-east-1.aws.neon.tech/neondb?sslmode=require" 3 | 4 | # OpenAI key retrieved here: https://platform.openai.com/api-keys 5 | OPENAI_API_KEY="sk-..." 6 | 7 | # If want to use Ollama as LLM (OpenAI API key still needed) 8 | OLLAMA_ENDPOINT="" 9 | -------------------------------------------------------------------------------- /ai/llamaindex/chatbot-nextjs/.env.example: -------------------------------------------------------------------------------- 1 | # Postgres URL retrieved here: https://console.neon.tech 2 | POSTGRES_URL="postgresql://neondb_owner:...@ep-...us-east-1.aws.neon.tech/neondb?sslmode=require" 3 | 4 | # OpenAI key retrieved here: https://platform.openai.com/api-keys 5 | OPENAI_API_KEY="sk-..." 6 | 7 | # If want to use Ollama as LLM (OpenAI API key still needed) 8 | OLLAMA_ENDPOINT="" 9 | -------------------------------------------------------------------------------- /with-nextjs-drizzle-edge/tailwind.config.js: -------------------------------------------------------------------------------- 1 | /** @type {import('tailwindcss').Config} */ 2 | module.exports = { 3 | content: ['./pages/**/*.{js,ts,jsx,tsx}', './components/**/*.{js,ts,jsx,tsx}', './app/**/*.{js,ts,jsx,tsx}'], 4 | theme: { 5 | extend: { 6 | fontFamily: { 7 | default: ['var(--font-inter)'], 8 | }, 9 | }, 10 | }, 11 | plugins: [], 12 | } 13 | -------------------------------------------------------------------------------- /with-nextjs-prisma-cloudflare-workers/next.config.mjs: -------------------------------------------------------------------------------- 1 | import { setupDevPlatform } from '@cloudflare/next-on-pages/next-dev' 2 | 3 | /** @type {import('next').NextConfig} */ 4 | const nextConfig = { 5 | images: { 6 | domains: ['images.ctfassets.net'], 7 | }, 8 | } 9 | 10 | if (process.env.NODE_ENV === 'development') await setupDevPlatform() 11 | 12 | export default nextConfig 13 | -------------------------------------------------------------------------------- /with-nextjs-prisma-edge/tailwind.config.js: -------------------------------------------------------------------------------- 1 | /** @type {import('tailwindcss').Config} */ 2 | module.exports = { 3 | content: ['./pages/**/*.{js,ts,jsx,tsx}', './components/**/*.{js,ts,jsx,tsx}', './app/**/*.{js,ts,jsx,tsx}'], 4 | theme: { 5 | extend: { 6 | fontFamily: { 7 | default: ['var(--font-inter)'], 8 | }, 9 | }, 10 | }, 11 | plugins: [], 12 | } 13 | -------------------------------------------------------------------------------- /with-nextjs-server-components/app/page.tsx: -------------------------------------------------------------------------------- 1 | import { neon } from "@neondatabase/serverless"; 2 | 3 | async function getData() { 4 | const sql = neon(process.env.DATABASE_URL); 5 | const response = await sql`SELECT version()`; 6 | return response[0].version; 7 | } 8 | 9 | export default async function Page() { 10 | const data = await getData(); 11 | return <>{data} 12 | } 13 | -------------------------------------------------------------------------------- /ai/langchain/chat-with-pdf-nextjs/.env.example: -------------------------------------------------------------------------------- 1 | # Postgres URL retrieved here: https://console.neon.tech 2 | POSTGRES_URL="postgresql://neondb_owner:...@ep-...us-east-1.aws.neon.tech/neondb?sslmode=require" 3 | 4 | # OpenAI key retrieved here: https://platform.openai.com/api-keys 5 | OPENAI_API_KEY="sk-..." 6 | 7 | # If want to use Ollama as LLM (OpenAI API key still needed) 8 | OLLAMA_ENDPOINT="" 9 | -------------------------------------------------------------------------------- /ai/llamaindex/chat-with-pdf-nextjs/.env.example: -------------------------------------------------------------------------------- 1 | # Postgres URL retrieved here: https://console.neon.tech 2 | POSTGRES_URL="postgresql://neondb_owner:...@ep-...us-east-1.aws.neon.tech/neondb?sslmode=require" 3 | 4 | # OpenAI key retrieved here: https://platform.openai.com/api-keys 5 | OPENAI_API_KEY="sk-..." 6 | 7 | # If want to use Ollama as LLM (OpenAI API key still needed) 8 | OLLAMA_ENDPOINT="" 9 | -------------------------------------------------------------------------------- /ai/llamaindex/semantic-search-nextjs/.env.example: -------------------------------------------------------------------------------- 1 | # Postgres URL retrieved here: https://console.neon.tech 2 | POSTGRES_URL="postgresql://neondb_owner:...@ep-...us-east-1.aws.neon.tech/neondb?sslmode=require" 3 | 4 | # OpenAI key retrieved here: https://platform.openai.com/api-keys 5 | OPENAI_API_KEY="sk-..." 6 | 7 | # If want to use Ollama as LLM (OpenAI API key still needed) 8 | OLLAMA_ENDPOINT="" 9 | -------------------------------------------------------------------------------- /deploy-with-cloudflare-workers/my-neon-worker/src/index.js: -------------------------------------------------------------------------------- 1 | import { Client } from '@neondatabase/serverless'; 2 | 3 | export default { 4 | async fetch(request, env, ctx) { 5 | const client = new Client(env.DATABASE_URL); 6 | await client.connect(); 7 | const { rows } = await client.query('SELECT * FROM books_to_read;'); 8 | return new Response(JSON.stringify(rows)); 9 | }, 10 | }; 11 | -------------------------------------------------------------------------------- /with-electricsql/react-app/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | dist 12 | dist-ssr 13 | *.local 14 | 15 | # Editor directories and files 16 | .vscode/* 17 | !.vscode/extensions.json 18 | .idea 19 | .DS_Store 20 | *.suo 21 | *.ntvs* 22 | *.njsproj 23 | *.sln 24 | *.sw? 25 | -------------------------------------------------------------------------------- /with-fastify/plugins/sensible.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | const fp = require('fastify-plugin') 4 | 5 | /** 6 | * This plugins adds some utilities to handle http errors 7 | * 8 | * @see https://github.com/fastify/fastify-sensible 9 | */ 10 | module.exports = fp(async function (fastify, opts) { 11 | fastify.register(require('@fastify/sensible'), { 12 | errorHandler: false 13 | }) 14 | }) 15 | -------------------------------------------------------------------------------- /with-nestjs/src/app.module.ts: -------------------------------------------------------------------------------- 1 | import { Module } from '@nestjs/common'; 2 | import { AppController } from './app.controller'; 3 | import { AppService } from './app.service'; 4 | import { DatabaseModule } from './database/database.module'; 5 | 6 | @Module({ 7 | imports: [DatabaseModule], 8 | controllers: [AppController], 9 | providers: [AppService], 10 | }) 11 | export class AppModule {} 12 | -------------------------------------------------------------------------------- /with-tanstack-start/app.config.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from "@tanstack/start/config"; 2 | import tsConfigPaths from "vite-tsconfig-paths"; 3 | import tailwindcss from "@tailwindcss/vite"; 4 | 5 | export default defineConfig({ 6 | vite: { 7 | plugins: [ 8 | tailwindcss(), 9 | tsConfigPaths({ 10 | projects: ["./tsconfig.json"], 11 | }), 12 | ], 13 | }, 14 | }); 15 | -------------------------------------------------------------------------------- /with-wasp/.gitignore: -------------------------------------------------------------------------------- 1 | .wasp/ 2 | node_modules/ 3 | **/.DS_Store 4 | 5 | # We ignore env files recognized and used by Wasp. 6 | .env.server 7 | .env.client 8 | 9 | # To be extra safe, we by default ignore any files with `.env` extension in them. 10 | # If this is too agressive for you, consider allowing specific files with `!` operator, 11 | # or modify/delete these two lines. 12 | *.env 13 | *.env.* 14 | -------------------------------------------------------------------------------- /with-nextjs-edge-functions/app/api/route.ts: -------------------------------------------------------------------------------- 1 | export const runtime = "edge"; 2 | 3 | import { neon } from "@neondatabase/serverless"; 4 | 5 | export async function GET() { 6 | if (!process.env.DATABASE_URL) return new Response(null, { status: 500 }); 7 | const sql = neon(process.env.DATABASE_URL); 8 | const response = await sql`SELECT version()`; 9 | return new Response(response[0].version); 10 | } 11 | -------------------------------------------------------------------------------- /ai/inngest/auto-embeddings-nextjs/src/inngest/client.ts: -------------------------------------------------------------------------------- 1 | import { Inngest } from "inngest"; 2 | 3 | export const inngest = new Inngest({ id: "Auto Embeddings App" }); 4 | 5 | // Define event types 6 | export type GenerateEmbeddingEvent = { 7 | name: "db/documents.inserted"; 8 | data: { 9 | new: { 10 | id: number; 11 | title: string; 12 | content: string; 13 | }; 14 | }; 15 | }; 16 | -------------------------------------------------------------------------------- /deploy-with-cloudflare-pages/my-neon-page/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | dist 12 | dist-ssr 13 | *.local 14 | 15 | # Editor directories and files 16 | .vscode/* 17 | !.vscode/extensions.json 18 | .idea 19 | .DS_Store 20 | *.suo 21 | *.ntvs* 22 | *.njsproj 23 | *.sln 24 | *.sw? 25 | -------------------------------------------------------------------------------- /deploy-with-deno/deno.lock: -------------------------------------------------------------------------------- 1 | { 2 | "version": "4", 3 | "specifiers": { 4 | "jsr:@neon/serverless@~0.10.1": "0.10.1" 5 | }, 6 | "jsr": { 7 | "@neon/serverless@0.10.1": { 8 | "integrity": "81f8e1349d54d9c9fb9cf21e753460c360237ab00d04a4b710b4aff891182dfb" 9 | } 10 | }, 11 | "workspace": { 12 | "dependencies": [ 13 | "jsr:@neon/serverless@~0.10.1" 14 | ] 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /with-nextjs-drizzle-edge/lib/drizzle.server.ts: -------------------------------------------------------------------------------- 1 | import { neonConfig, Pool } from '@neondatabase/serverless' 2 | import { drizzle } from 'drizzle-orm/neon-serverless' 3 | import { WebSocket } from 'ws' 4 | 5 | neonConfig.webSocketConstructor = WebSocket 6 | neonConfig.poolQueryViaFetch = true 7 | 8 | const pool = new Pool({ connectionString: process.env.POSTGRES_URL }) 9 | 10 | export default drizzle(pool) 11 | -------------------------------------------------------------------------------- /with-react-router/vite.config.ts: -------------------------------------------------------------------------------- 1 | import { reactRouter } from "@react-router/dev/vite"; 2 | import tailwindcss from "@tailwindcss/vite"; 3 | import { defineConfig } from "vite"; 4 | import tsconfigPaths from "vite-tsconfig-paths"; 5 | 6 | export default defineConfig({ 7 | plugins: [tailwindcss(), reactRouter(), tsconfigPaths()], 8 | build: { 9 | cssMinify: true, 10 | ssr: false, 11 | }, 12 | }); 13 | -------------------------------------------------------------------------------- /with-golang/go.mod: -------------------------------------------------------------------------------- 1 | module neon-go-quickstart 2 | 3 | go 1.24.5 4 | 5 | require ( 6 | github.com/jackc/pgx/v5 v5.7.5 7 | github.com/joho/godotenv v1.5.1 8 | ) 9 | 10 | require ( 11 | github.com/jackc/pgpassfile v1.0.0 // indirect 12 | github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761 // indirect 13 | golang.org/x/crypto v0.37.0 // indirect 14 | golang.org/x/text v0.24.0 // indirect 15 | ) 16 | -------------------------------------------------------------------------------- /with-analog/src/app/app.config.server.ts: -------------------------------------------------------------------------------- 1 | import { mergeApplicationConfig, ApplicationConfig } from '@angular/core'; 2 | import { provideServerRendering } from '@angular/platform-server'; 3 | 4 | import { appConfig } from './app.config'; 5 | 6 | const serverConfig: ApplicationConfig = { 7 | providers: [provideServerRendering()], 8 | }; 9 | 10 | export const config = mergeApplicationConfig(appConfig, serverConfig); 11 | -------------------------------------------------------------------------------- /with-micronaut-kotlin/src/main/kotlin/com/example/repository/BookRepository.kt: -------------------------------------------------------------------------------- 1 | package com.example.repository 2 | 3 | import com.example.entity.Book 4 | import io.micronaut.data.jdbc.annotation.JdbcRepository 5 | import io.micronaut.data.model.query.builder.sql.Dialect 6 | import io.micronaut.data.repository.CrudRepository 7 | 8 | @JdbcRepository(dialect = Dialect.POSTGRES) 9 | interface BookRepository : CrudRepository -------------------------------------------------------------------------------- /deploy-with-cloudflare-pages/functions/books/index.js: -------------------------------------------------------------------------------- 1 | import { Client } from "@neondatabase/serverless"; 2 | 3 | export async function onRequestGet(context) { 4 | const client = new Client(context.env.DATABASE_URL); 5 | await client.connect(); 6 | // Logic to fetch books from your database 7 | const { rows } = await client.query("SELECT * FROM books_to_read;"); 8 | return new Response(JSON.stringify(rows)); 9 | } 10 | -------------------------------------------------------------------------------- /with-node-postgres/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "with-node-postgres", 3 | "version": "1.0.0", 4 | "type": "module", 5 | "description": "", 6 | "main": "index.js", 7 | "scripts": { 8 | "test": "echo \"Error: no test specified\" && exit 1" 9 | }, 10 | "keywords": [], 11 | "author": "", 12 | "license": "ISC", 13 | "dependencies": { 14 | "dotenv": "^17.2.1", 15 | "pg": "^8.16.3" 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /with-analog/tsconfig.app.json: -------------------------------------------------------------------------------- 1 | /* To learn more about this file see: https://angular.io/config/tsconfig. */ 2 | { 3 | "extends": "./tsconfig.json", 4 | "compilerOptions": { 5 | "outDir": "./out-tsc/app", 6 | "types": [] 7 | }, 8 | "files": ["src/main.ts", "src/main.server.ts"], 9 | "include": [ 10 | "src/**/*.d.ts", 11 | "src/app/pages/**/*.page.ts", 12 | "src/server/middleware/**/*.ts" 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /with-angular/src/app/app.config.server.ts: -------------------------------------------------------------------------------- 1 | import { mergeApplicationConfig, ApplicationConfig } from '@angular/core'; 2 | import { provideServerRendering } from '@angular/platform-server'; 3 | import { appConfig } from './app.config'; 4 | 5 | const serverConfig: ApplicationConfig = { 6 | providers: [ 7 | provideServerRendering() 8 | ] 9 | }; 10 | 11 | export const config = mergeApplicationConfig(appConfig, serverConfig); 12 | -------------------------------------------------------------------------------- /with-dart/index.dart: -------------------------------------------------------------------------------- 1 | import 'dart:io'; 2 | import 'package:postgres/postgres.dart'; 3 | 4 | void main() async { 5 | final conn = await Connection.open(Endpoint( 6 | host: 'ep-...us-east-1.aws.neon.tech', 7 | database: 'neondb', 8 | username: 'neondb_owner', 9 | password: '...', 10 | )); 11 | final result = await conn.execute("SELECT * from playing_with_neon;"); 12 | print(result); 13 | exit(0); 14 | } 15 | -------------------------------------------------------------------------------- /with-laravel/artisan: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env php 2 | handleCommand(new ArgvInput); 14 | 15 | exit($status); 16 | -------------------------------------------------------------------------------- /with-node-postgres-js/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "with-node-postgres", 3 | "version": "1.0.0", 4 | "type": "module", 5 | "description": "", 6 | "main": "index.js", 7 | "scripts": { 8 | "test": "echo \"Error: no test specified\" && exit 1" 9 | }, 10 | "keywords": [], 11 | "author": "", 12 | "license": "ISC", 13 | "dependencies": { 14 | "dotenv": "^17.2.1", 15 | "postgres": "^3.4.7" 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /with_phoenix/priv/repo/seeds.exs: -------------------------------------------------------------------------------- 1 | # Script for populating the database. You can run it as: 2 | # 3 | # mix run priv/repo/seeds.exs 4 | # 5 | # Inside the script, you can read and write to any of your 6 | # repositories directly: 7 | # 8 | # WithPhoenix.Repo.insert!(%WithPhoenix.SomeSchema{}) 9 | # 10 | # We recommend using the bang functions (`insert!`, `update!` 11 | # and so on) as they will fail if something goes wrong. 12 | -------------------------------------------------------------------------------- /with-nextjs-prisma/prisma/migrations/20230226214531_initial_migration/migration.sql: -------------------------------------------------------------------------------- 1 | -- CreateTable 2 | CREATE TABLE "Element" ( 3 | "id" TEXT NOT NULL, 4 | "elementName" TEXT NOT NULL, 5 | "atomicNumber" INTEGER NOT NULL, 6 | "symbol" TEXT NOT NULL, 7 | 8 | CONSTRAINT "Element_pkey" PRIMARY KEY ("id") 9 | ); 10 | 11 | -- CreateIndex 12 | CREATE UNIQUE INDEX "Element_atomicNumber_key" ON "Element"("atomicNumber"); 13 | -------------------------------------------------------------------------------- /with-nextjs-drizzle-edge/app/globals.css: -------------------------------------------------------------------------------- 1 | @tailwind base; 2 | @tailwind components; 3 | @tailwind utilities; 4 | 5 | :root { 6 | --foreground-rgb: 0, 0, 0; 7 | --background-start-rgb: 214, 219, 220; 8 | --background-end-rgb: 255, 255, 255; 9 | } 10 | 11 | body { 12 | color: rgb(var(--foreground-rgb)); 13 | background: linear-gradient(to bottom, transparent, rgb(var(--background-end-rgb))) rgb(var(--background-start-rgb)); 14 | } 15 | -------------------------------------------------------------------------------- /with-nextjs-prisma-edge/app/globals.css: -------------------------------------------------------------------------------- 1 | @tailwind base; 2 | @tailwind components; 3 | @tailwind utilities; 4 | 5 | :root { 6 | --foreground-rgb: 0, 0, 0; 7 | --background-start-rgb: 214, 219, 220; 8 | --background-end-rgb: 255, 255, 255; 9 | } 10 | 11 | body { 12 | color: rgb(var(--foreground-rgb)); 13 | background: linear-gradient(to bottom, transparent, rgb(var(--background-end-rgb))) rgb(var(--background-start-rgb)); 14 | } 15 | -------------------------------------------------------------------------------- /with-nextjs-prisma/prisma/schema.prisma: -------------------------------------------------------------------------------- 1 | generator client { 2 | provider = "prisma-client-js" 3 | } 4 | 5 | datasource db { 6 | provider = "postgresql" 7 | url = env("DATABASE_URL") 8 | directUrl = env("DIRECT_DATABASE_URL") 9 | } 10 | 11 | model Element { 12 | id String @id @default(cuid()) 13 | elementName String 14 | atomicNumber Int @unique 15 | symbol String 16 | } 17 | -------------------------------------------------------------------------------- /with-waku/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "strict": true, 4 | "target": "esnext", 5 | "downlevelIteration": true, 6 | "esModuleInterop": true, 7 | "module": "esnext", 8 | "moduleResolution": "bundler", 9 | "skipLibCheck": true, 10 | "noUncheckedIndexedAccess": true, 11 | "exactOptionalPropertyTypes": true, 12 | "types": ["react/experimental"], 13 | "jsx": "react-jsx" 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /deploy-with-cloudflare-pages/my-neon-page/functions/books/index.js: -------------------------------------------------------------------------------- 1 | import { Client } from "@neondatabase/serverless"; 2 | 3 | export async function onRequestGet(context) { 4 | const client = new Client(context.env.DATABASE_URL); 5 | await client.connect(); 6 | 7 | // Logic to fetch books from your database 8 | const { rows } = await client.query("SELECT * FROM books_to_read;"); 9 | return new Response(JSON.stringify(rows)); 10 | } 11 | -------------------------------------------------------------------------------- /with-dotnet-entity-framework/NeonEfExample/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning" 6 | } 7 | }, 8 | "ConnectionStrings": { 9 | "DefaultConnection": "Host=your-neon-host;Database=your-db;Username=your-username;Password=your-password;SSL Mode=Require;Trust Server Certificate=true;MaxPoolSize=20" 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /ai/hybrid-search-nextjs/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": "app/globals.css", 9 | "baseColor": "slate", 10 | "cssVariables": true, 11 | "prefix": "" 12 | }, 13 | "aliases": { 14 | "components": "@/components", 15 | "utils": "@/lib/utils" 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /ai/langchain/rag-nextjs/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": "app/globals.css", 9 | "baseColor": "slate", 10 | "cssVariables": true, 11 | "prefix": "" 12 | }, 13 | "aliases": { 14 | "components": "@/components", 15 | "utils": "@/lib/utils" 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /ai/llamaindex/rag-nextjs/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": "app/globals.css", 9 | "baseColor": "slate", 10 | "cssVariables": true, 11 | "prefix": "" 12 | }, 13 | "aliases": { 14 | "components": "@/components", 15 | "utils": "@/lib/utils" 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /deploy-with-cloudflare-pages/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Vite + React 8 | 9 | 10 |
11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /with-analog/src/app/pages/index.page.ts: -------------------------------------------------------------------------------- 1 | import { load } from './index.server'; 2 | import { Component } from '@angular/core'; 3 | import { injectLoad } from '@analogjs/router'; 4 | import { toSignal } from '@angular/core/rxjs-interop'; 5 | 6 | @Component({ 7 | standalone: true, 8 | template: `{{ data()['version'] }}`, 9 | }) 10 | export default class BlogComponent { 11 | data = toSignal(injectLoad(), { requireSync: true }); 12 | } 13 | -------------------------------------------------------------------------------- /with-neon-serverless/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "with-neon-serverless", 3 | "version": "1.0.0", 4 | "type": "module", 5 | "description": "", 6 | "main": "index.js", 7 | "scripts": { 8 | "test": "echo \"Error: no test specified\" && exit 1" 9 | }, 10 | "keywords": [], 11 | "author": "", 12 | "license": "ISC", 13 | "dependencies": { 14 | "@neondatabase/serverless": "^1.0.1", 15 | "dotenv": "^17.2.1" 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /with-nextjs-drizzle-local-vercel/app/globals.css: -------------------------------------------------------------------------------- 1 | @tailwind base; 2 | @tailwind components; 3 | @tailwind utilities; 4 | 5 | :root { 6 | --foreground-rgb: 0, 0, 0; 7 | --background-start-rgb: 214, 219, 220; 8 | --background-end-rgb: 255, 255, 255; 9 | } 10 | 11 | body { 12 | color: rgb(var(--foreground-rgb)); 13 | background: linear-gradient(to bottom, transparent, rgb(var(--background-end-rgb))) rgb(var(--background-start-rgb)); 14 | } 15 | -------------------------------------------------------------------------------- /ai/aws-bedrock/chatbot-nextjs/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": "app/globals.css", 9 | "baseColor": "slate", 10 | "cssVariables": true, 11 | "prefix": "" 12 | }, 13 | "aliases": { 14 | "components": "@/components", 15 | "utils": "@/lib/utils" 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /ai/langchain/chatbot-nextjs/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": "app/globals.css", 9 | "baseColor": "slate", 10 | "cssVariables": true, 11 | "prefix": "" 12 | }, 13 | "aliases": { 14 | "components": "@/components", 15 | "utils": "@/lib/utils" 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /ai/llamaindex/chatbot-nextjs/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": "app/globals.css", 9 | "baseColor": "slate", 10 | "cssVariables": true, 11 | "prefix": "" 12 | }, 13 | "aliases": { 14 | "components": "@/components", 15 | "utils": "@/lib/utils" 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /with-astro/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "module", 3 | "name": "with-astro", 4 | "scripts": { 5 | "dev": "astro dev", 6 | "start": "astro dev", 7 | "build": "astro check && astro build", 8 | "preview": "astro preview", 9 | "astro": "astro" 10 | }, 11 | "dependencies": { 12 | "@astrojs/check": "^0.7.0", 13 | "@neondatabase/serverless": "^1.0.0", 14 | "astro": "^4.9.2", 15 | "typescript": "^5.4.5" 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /with-java-jdbc/src/test/java/com/neon/quickstart/AppTest.java: -------------------------------------------------------------------------------- 1 | package com.neon.quickstart; 2 | 3 | import static org.junit.jupiter.api.Assertions.assertTrue; 4 | 5 | import org.junit.jupiter.api.Test; 6 | 7 | /** 8 | * Unit test for simple App. 9 | */ 10 | public class AppTest { 11 | 12 | /** 13 | * Rigorous Test :-) 14 | */ 15 | @Test 16 | public void shouldAnswerWithTrue() { 17 | assertTrue(true); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /with-nextjs-prisma-cloudflare-workers/app/globals.css: -------------------------------------------------------------------------------- 1 | @tailwind base; 2 | @tailwind components; 3 | @tailwind utilities; 4 | 5 | :root { 6 | --foreground-rgb: 0, 0, 0; 7 | --background-start-rgb: 214, 219, 220; 8 | --background-end-rgb: 255, 255, 255; 9 | } 10 | 11 | body { 12 | color: rgb(var(--foreground-rgb)); 13 | background: linear-gradient(to bottom, transparent, rgb(var(--background-end-rgb))) rgb(var(--background-start-rgb)); 14 | } 15 | -------------------------------------------------------------------------------- /with-remix/vite.config.ts: -------------------------------------------------------------------------------- 1 | import { vitePlugin as remix } from "@remix-run/dev"; 2 | import { defineConfig } from "vite"; 3 | import tsconfigPaths from "vite-tsconfig-paths"; 4 | 5 | export default defineConfig({ 6 | plugins: [ 7 | remix({ 8 | future: { 9 | v3_fetcherPersist: true, 10 | v3_relativeSplatPath: true, 11 | v3_throwAbortReason: true, 12 | }, 13 | }), 14 | tsconfigPaths(), 15 | ], 16 | }); 17 | -------------------------------------------------------------------------------- /ai/langchain/chat-with-pdf-nextjs/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": "app/globals.css", 9 | "baseColor": "slate", 10 | "cssVariables": true, 11 | "prefix": "" 12 | }, 13 | "aliases": { 14 | "components": "@/components", 15 | "utils": "@/lib/utils" 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /ai/llamaindex/chat-with-pdf-nextjs/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": "app/globals.css", 9 | "baseColor": "slate", 10 | "cssVariables": true, 11 | "prefix": "" 12 | }, 13 | "aliases": { 14 | "components": "@/components", 15 | "utils": "@/lib/utils" 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /with-dotnet-entity-framework/NeonEfExample/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning" 6 | } 7 | }, 8 | "AllowedHosts": "*", 9 | "ConnectionStrings": { 10 | "DefaultConnection": "Host=your-neon-host;Database=your-db;Username=your-username;Password=your-password;SSL Mode=Require;Trust Server Certificate=true;MaxPoolSize=20" 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /ai/langchain/semantic-search-nextjs/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": "app/globals.css", 9 | "baseColor": "slate", 10 | "cssVariables": true, 11 | "prefix": "" 12 | }, 13 | "aliases": { 14 | "components": "@/components", 15 | "utils": "@/lib/utils" 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /ai/llamaindex/semantic-search-nextjs/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": "app/globals.css", 9 | "baseColor": "slate", 10 | "cssVariables": true, 11 | "prefix": "" 12 | }, 13 | "aliases": { 14 | "components": "@/components", 15 | "utils": "@/lib/utils" 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /deploy-with-cloudflare-pages/my-neon-page/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Vite + React 8 | 9 | 10 |
11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /ai/llamaindex/rag-nextjs/lib/vectorStore.ts: -------------------------------------------------------------------------------- 1 | import { OpenAIEmbedding, Settings } from 'llamaindex' 2 | import { PGVectorStore } from 'llamaindex/storage/vectorStore/PGVectorStore' 3 | 4 | Settings.embedModel = new OpenAIEmbedding({ 5 | dimensions: 512, 6 | model: 'text-embedding-3-small', 7 | }) 8 | 9 | const vectorStore = new PGVectorStore({ 10 | dimensions: 512, 11 | connectionString: process.env.POSTGRES_URL, 12 | }) 13 | 14 | export default vectorStore 15 | -------------------------------------------------------------------------------- /ai/llamaindex/reverse-image-search-nextjs/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": "app/globals.css", 9 | "baseColor": "slate", 10 | "cssVariables": true, 11 | "prefix": "" 12 | }, 13 | "aliases": { 14 | "components": "@/components", 15 | "utils": "@/lib/utils" 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /with-dotnet-entity-framework/NeonEfExample/Data/ApplicationDbContext.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.EntityFrameworkCore; 2 | using NeonEfExample.Models; 3 | 4 | namespace NeonEfExample.Data 5 | { 6 | public class ApplicationDbContext : DbContext 7 | { 8 | public ApplicationDbContext(DbContextOptions options) 9 | : base(options) 10 | { 11 | } 12 | 13 | public DbSet Todos => Set(); 14 | } 15 | } -------------------------------------------------------------------------------- /with-encore/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "neon-encore-example", 3 | "version": "1.0.0", 4 | "description": "Example Encore.ts application with Neon Postgres", 5 | "private": true, 6 | "type": "module", 7 | "scripts": { 8 | "dev": "encore run", 9 | "test": "encore test" 10 | }, 11 | "dependencies": { 12 | "encore.dev": "^1.53.0" 13 | }, 14 | "devDependencies": { 15 | "@types/node": "^22.0.0", 16 | "typescript": "^5.6.0" 17 | } 18 | } -------------------------------------------------------------------------------- /with-hyperdrive/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "with-hyperdrive", 3 | "scripts": { 4 | "dev": "wrangler dev", 5 | "deploy": "wrangler deploy", 6 | "cf-typegen": "wrangler types" 7 | }, 8 | "devDependencies": { 9 | "@cloudflare/workers-types": "^4.20241205.0", 10 | "typescript": "^5.5.2", 11 | "wrangler": "^3.95.0" 12 | }, 13 | "dependencies": { 14 | "@neondatabase/serverless": "^1.0.0", 15 | "postgres": "^3.4.5" 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /with-nextjs-drizzle-local-vercel/drizzle.config.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'drizzle-kit' 2 | 3 | const url = process.env.NODE_ENV === 'production' ? process.env.POSTGRES_URL : process.env.LOCAL_POSTGRES_URL 4 | if (!url) throw new Error(`Connection string to ${process.env.NODE_ENV ? 'Neon' : 'local'} Postgres not found.`) 5 | 6 | export default defineConfig({ 7 | dialect: 'postgresql', 8 | dbCredentials: { url }, 9 | schema: './lib/schema.ts', 10 | }) 11 | -------------------------------------------------------------------------------- /with-nextjs-serverless-functions/pages/api/index.ts: -------------------------------------------------------------------------------- 1 | import type { NextApiRequest, NextApiResponse } from "next"; 2 | 3 | import { neon } from "@neondatabase/serverless"; 4 | 5 | const sql = neon(process.env.DATABASE_URL); 6 | 7 | export default async function handler( 8 | req: NextApiRequest, 9 | res: NextApiResponse 10 | ) { 11 | const response = await sql`SELECT version()`; 12 | res.status(200).json({ 13 | message: response[0].version, 14 | }); 15 | } 16 | -------------------------------------------------------------------------------- /ai/llamaindex/chatbot-nextjs/lib/vectorStore.ts: -------------------------------------------------------------------------------- 1 | import { OpenAIEmbedding, Settings } from 'llamaindex' 2 | import { PGVectorStore } from 'llamaindex/storage/vectorStore/PGVectorStore' 3 | 4 | Settings.embedModel = new OpenAIEmbedding({ 5 | dimensions: 512, 6 | model: 'text-embedding-3-small', 7 | }) 8 | 9 | const vectorStore = new PGVectorStore({ 10 | dimensions: 512, 11 | connectionString: process.env.POSTGRES_URL, 12 | }) 13 | 14 | export default vectorStore 15 | -------------------------------------------------------------------------------- /with-nextjs-get-static-props/pages/index.tsx: -------------------------------------------------------------------------------- 1 | import { neon } from "@neondatabase/serverless"; 2 | 3 | export async function getStaticProps() { 4 | if (!process.env.DATABASE_URL) return { props: { data: "" } }; 5 | const sql = neon(process.env.DATABASE_URL); 6 | const response = await sql`SELECT version()`; 7 | return { props: { data: response[0].version } }; 8 | } 9 | 10 | export default function Page({ data }: { data: string }) { 11 | return <>{data}; 12 | } 13 | -------------------------------------------------------------------------------- /ai/llamaindex/semantic-search-nextjs/lib/vectorStore.ts: -------------------------------------------------------------------------------- 1 | import { OpenAIEmbedding, Settings } from 'llamaindex' 2 | import { PGVectorStore } from 'llamaindex/storage/vectorStore/PGVectorStore' 3 | 4 | Settings.embedModel = new OpenAIEmbedding({ 5 | dimensions: 512, 6 | model: 'text-embedding-3-small', 7 | }) 8 | 9 | const vectorStore = new PGVectorStore({ 10 | dimensions: 512, 11 | connectionString: process.env.POSTGRES_URL, 12 | }) 13 | 14 | export default vectorStore 15 | -------------------------------------------------------------------------------- /with-laravel/tests/Feature/ExampleTest.php: -------------------------------------------------------------------------------- 1 | get('/'); 16 | 17 | $response->assertStatus(200); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /with_phoenix/test/with_phoenix_web/controllers/error_json_test.exs: -------------------------------------------------------------------------------- 1 | defmodule WithPhoenixWeb.ErrorJSONTest do 2 | use WithPhoenixWeb.ConnCase, async: true 3 | 4 | test "renders 404" do 5 | assert WithPhoenixWeb.ErrorJSON.render("404.json", %{}) == %{errors: %{detail: "Not Found"}} 6 | end 7 | 8 | test "renders 500" do 9 | assert WithPhoenixWeb.ErrorJSON.render("500.json", %{}) == 10 | %{errors: %{detail: "Internal Server Error"}} 11 | end 12 | end 13 | -------------------------------------------------------------------------------- /ai/inngest/rag-starter-nextjs/src/app/globals.css: -------------------------------------------------------------------------------- 1 | @tailwind base; 2 | @tailwind components; 3 | @tailwind utilities; 4 | 5 | :root { 6 | --background: #ffffff; 7 | --foreground: #171717; 8 | } 9 | 10 | @media (prefers-color-scheme: dark) { 11 | :root { 12 | --background: #0a0a0a; 13 | --foreground: #ededed; 14 | } 15 | } 16 | 17 | body { 18 | color: var(--foreground); 19 | background: var(--background); 20 | font-family: Arial, Helvetica, sans-serif; 21 | } 22 | -------------------------------------------------------------------------------- /ai/langchain/chatbot-nextjs/lib/vectorStore.ts: -------------------------------------------------------------------------------- 1 | import { NeonPostgres } from '@langchain/community/vectorstores/neon' 2 | import { OpenAIEmbeddings } from '@langchain/openai' 3 | 4 | const embeddings = new OpenAIEmbeddings({ 5 | dimensions: 512, 6 | model: "text-embedding-3-small" 7 | }) 8 | 9 | export default async function loadVectorStore() { 10 | return await NeonPostgres.initialize(embeddings, { 11 | connectionString: process.env.POSTGRES_URL as string, 12 | }) 13 | } 14 | -------------------------------------------------------------------------------- /ai/langchain/rag-nextjs/lib/vectorStore.ts: -------------------------------------------------------------------------------- 1 | import { NeonPostgres } from '@langchain/community/vectorstores/neon' 2 | import { OpenAIEmbeddings } from '@langchain/openai' 3 | 4 | const embeddings = new OpenAIEmbeddings({ 5 | dimensions: 512, 6 | model: "text-embedding-3-small" 7 | }) 8 | 9 | export default async function loadVectorStore() { 10 | return await NeonPostgres.initialize(embeddings, { 11 | connectionString: process.env.POSTGRES_URL as string, 12 | }) 13 | } 14 | -------------------------------------------------------------------------------- /with-hono/.gitignore: -------------------------------------------------------------------------------- 1 | # dev 2 | .vercel/ 3 | .yarn/ 4 | !.yarn/releases 5 | .vscode/* 6 | !.vscode/launch.json 7 | !.vscode/*.code-snippets 8 | .idea/workspace.xml 9 | .idea/usage.statistics.xml 10 | .idea/shelf 11 | 12 | # deps 13 | node_modules/ 14 | 15 | # env 16 | .env 17 | .env.production 18 | 19 | # logs 20 | logs/ 21 | *.log 22 | npm-debug.log* 23 | yarn-debug.log* 24 | yarn-error.log* 25 | pnpm-debug.log* 26 | lerna-debug.log* 27 | 28 | # misc 29 | .DS_Store 30 | .vercel 31 | -------------------------------------------------------------------------------- /with-knex/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "module", 3 | "name": "with-knex", 4 | "scripts": { 5 | "test": "tsx index.tsx", 6 | "fmt": "prettier --write '**/*' --ignore-unknown" 7 | }, 8 | "dependencies": { 9 | "@neondatabase/serverless": "^1.0.0", 10 | "dotenv": "^16.4.5", 11 | "knex": "^3.1.0", 12 | "pg": "^8.12.0", 13 | "pg-native": "^3.1.0" 14 | }, 15 | "devDependencies": { 16 | "prettier": "^3.3.3", 17 | "tsx": "^4.16.4" 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /with-micronaut-kotlin/micronaut-cli.yml: -------------------------------------------------------------------------------- 1 | applicationType: default 2 | defaultPackage: with.micronaut.kotlin 3 | testFramework: junit 4 | sourceLanguage: kotlin 5 | buildTool: gradle_kotlin 6 | features: [app-name, data, data-jdbc, flyway, gradle, http-client-test, jdbc-hikari, junit, kotlin, kotlin-application, ksp, logback, micronaut-aot, micronaut-build, micronaut-http-validation, netty-server, postgres, readme, serialization-jackson, shade, static-resources, test-resources, yaml, yaml-build] 7 | -------------------------------------------------------------------------------- /with-nextjs-get-server-side-props/pages/index.tsx: -------------------------------------------------------------------------------- 1 | import { neon } from "@neondatabase/serverless"; 2 | 3 | export async function getServerSideProps() { 4 | if (!process.env.DATABASE_URL) return { props: { data: "" } }; 5 | const sql = neon(process.env.DATABASE_URL); 6 | const response = await sql`SELECT version()`; 7 | return { props: { data: response[0].version } }; 8 | } 9 | 10 | export default function Page({ data }: { data: string }) { 11 | return <>{data}; 12 | } 13 | -------------------------------------------------------------------------------- /with-nextjs-prisma-edge/app/api/users/route.ts: -------------------------------------------------------------------------------- 1 | export const runtime = 'edge' 2 | 3 | export const dynamic = 'force-dynamic' 4 | 5 | export const fetchCache = 'force-no-store' 6 | 7 | import prisma from '@/lib/prisma.server' 8 | 9 | export async function GET() { 10 | const startTime = Date.now() 11 | const users = await prisma.users.findMany() 12 | await prisma.$disconnect() 13 | const duration = Date.now() - startTime 14 | return Response.json({ users, duration }) 15 | } 16 | -------------------------------------------------------------------------------- /ai/inngest/auto-embeddings-nextjs/src/app/globals.css: -------------------------------------------------------------------------------- 1 | @tailwind base; 2 | @tailwind components; 3 | @tailwind utilities; 4 | 5 | :root { 6 | --background: #ffffff; 7 | --foreground: #171717; 8 | } 9 | 10 | @media (prefers-color-scheme: dark) { 11 | :root { 12 | --background: #0a0a0a; 13 | --foreground: #ededed; 14 | } 15 | } 16 | 17 | body { 18 | color: var(--foreground); 19 | background: var(--background); 20 | font-family: Arial, Helvetica, sans-serif; 21 | } 22 | -------------------------------------------------------------------------------- /with-django/myproject/asgi.py: -------------------------------------------------------------------------------- 1 | """ 2 | ASGI config for myproject project. 3 | 4 | It exposes the ASGI callable as a module-level variable named ``application``. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/5.0/howto/deployment/asgi/ 8 | """ 9 | 10 | import os 11 | 12 | from django.core.asgi import get_asgi_application 13 | 14 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'myproject.settings') 15 | 16 | application = get_asgi_application() 17 | -------------------------------------------------------------------------------- /with-django/myproject/wsgi.py: -------------------------------------------------------------------------------- 1 | """ 2 | WSGI config for myproject project. 3 | 4 | It exposes the WSGI callable as a module-level variable named ``application``. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/5.0/howto/deployment/wsgi/ 8 | """ 9 | 10 | import os 11 | 12 | from django.core.wsgi import get_wsgi_application 13 | 14 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'myproject.settings') 15 | 16 | application = get_wsgi_application() 17 | -------------------------------------------------------------------------------- /with-tanstack-start/app/router.tsx: -------------------------------------------------------------------------------- 1 | import { createRouter as createTanStackRouter } from "@tanstack/react-router"; 2 | import { routeTree } from "./routeTree.gen"; 3 | 4 | export function createRouter() { 5 | const router = createTanStackRouter({ 6 | routeTree, 7 | scrollRestoration: true, 8 | }); 9 | 10 | return router; 11 | } 12 | 13 | declare module "@tanstack/react-router" { 14 | interface Register { 15 | router: ReturnType; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /ai/langchain/chat-with-pdf-nextjs/lib/vectorStore.ts: -------------------------------------------------------------------------------- 1 | import { NeonPostgres } from '@langchain/community/vectorstores/neon' 2 | import { OpenAIEmbeddings } from '@langchain/openai' 3 | 4 | const embeddings = new OpenAIEmbeddings({ 5 | dimensions: 512, 6 | model: "text-embedding-3-small" 7 | }) 8 | 9 | export default async function loadVectorStore() { 10 | return await NeonPostgres.initialize(embeddings, { 11 | connectionString: process.env.POSTGRES_URL as string, 12 | }) 13 | } 14 | -------------------------------------------------------------------------------- /ai/langchain/semantic-search-nextjs/lib/vectorStore.ts: -------------------------------------------------------------------------------- 1 | import { NeonPostgres } from '@langchain/community/vectorstores/neon' 2 | import { OpenAIEmbeddings } from '@langchain/openai' 3 | 4 | const embeddings = new OpenAIEmbeddings({ 5 | dimensions: 512, 6 | model: "text-embedding-3-small" 7 | }) 8 | 9 | export default async function loadVectorStore() { 10 | return await NeonPostgres.initialize(embeddings, { 11 | connectionString: process.env.POSTGRES_URL as string, 12 | }) 13 | } 14 | -------------------------------------------------------------------------------- /with-micronaut-kotlin/src/main/kotlin/com/example/entity/Book.kt: -------------------------------------------------------------------------------- 1 | package com.example.entity 2 | 3 | import io.micronaut.data.annotation.GeneratedValue 4 | import io.micronaut.data.annotation.Id 5 | import io.micronaut.data.annotation.MappedEntity 6 | import io.micronaut.serde.annotation.Serdeable 7 | 8 | @MappedEntity 9 | @Serdeable 10 | data class Book( 11 | @field:Id 12 | @field:GeneratedValue 13 | var id: Long? = null, 14 | var title: String, 15 | var author: String 16 | ) -------------------------------------------------------------------------------- /with-waku/src/pages/index.tsx: -------------------------------------------------------------------------------- 1 | import { neon } from "@neondatabase/serverless"; 2 | 3 | export default async function HomePage() { 4 | const data = await getData(); 5 | return <>{data.version}; 6 | } 7 | 8 | const getData = async () => { 9 | const sql = neon(`${process.env.DATABASE_URL}`); 10 | const result = await sql`SELECT version()`; 11 | return result[0]; 12 | }; 13 | 14 | export const getConfig = async () => { 15 | return { 16 | render: "static", 17 | }; 18 | }; 19 | -------------------------------------------------------------------------------- /ai/llamaindex/reverse-image-search-nextjs/next.config.mjs: -------------------------------------------------------------------------------- 1 | /** @type {import('next').NextConfig} */ 2 | const nextConfig = { 3 | experimental: { 4 | serverComponentsExternalPackages: ["sharp", "onnxruntime-node", "@xenova/transformers"], 5 | }, 6 | webpack: (config) => { 7 | config.resolve.alias = { 8 | ...config.resolve.alias, 9 | sharp$: false, 10 | 'onnxruntime-node$': false, 11 | } 12 | return config 13 | }, 14 | } 15 | 16 | export default nextConfig 17 | -------------------------------------------------------------------------------- /with-nextjs-prisma-cloudflare-workers/app/api/users/route.ts: -------------------------------------------------------------------------------- 1 | export const runtime = 'edge' 2 | 3 | export const dynamic = 'force-dynamic' 4 | 5 | export const fetchCache = 'force-no-store' 6 | 7 | import prisma from '@/lib/prisma.server' 8 | 9 | export async function GET() { 10 | const startTime = Date.now() 11 | const users = await prisma.users.findMany() 12 | await prisma.$disconnect() 13 | const duration = Date.now() - startTime 14 | return Response.json({ users, duration }) 15 | } 16 | -------------------------------------------------------------------------------- /with-redwoodsdk/src/worker.tsx: -------------------------------------------------------------------------------- 1 | import { render, route } from "rwsdk/router"; 2 | import { defineApp } from "rwsdk/worker"; 3 | 4 | import { Document } from "@/app/Document"; 5 | import { setCommonHeaders } from "@/app/headers"; 6 | import { Home } from "@/app/pages/Home"; 7 | 8 | export type AppContext = {}; 9 | 10 | export default defineApp([ 11 | setCommonHeaders(), 12 | ({ ctx }) => { 13 | // setup ctx here 14 | ctx; 15 | }, 16 | render(Document, [route("/", Home)]), 17 | ]); 18 | -------------------------------------------------------------------------------- /with-micronaut-kotlin/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | micronaut: 2 | application: 3 | name: with-micronaut-kotlin 4 | datasources: 5 | default: 6 | url: "jdbc:postgresql://endpoint.neon.tech/dbname?sslmode=require&channelBinding=require" 7 | username: "" 8 | password: "" 9 | driver-class-name: org.postgresql.Driver 10 | db-type: postgres 11 | dialect: POSTGRES 12 | flyway: 13 | datasources: 14 | default: 15 | enabled: true 16 | -------------------------------------------------------------------------------- /with-nextjs-drizzle-edge/app/api/users/route.ts: -------------------------------------------------------------------------------- 1 | export const runtime = 'edge' 2 | 3 | export const dynamic = 'force-dynamic' 4 | 5 | export const fetchCache = 'force-no-store' 6 | 7 | import db from "@/lib/drizzle.server"; 8 | import { usersTable } from "@/lib/schema"; 9 | 10 | export async function GET() { 11 | const startTime = Date.now() 12 | const users = await db.select().from(usersTable) 13 | const duration = Date.now() - startTime 14 | return Response.json({ users, duration }) 15 | } 16 | -------------------------------------------------------------------------------- /auth/with-authjs-next/auth.ts: -------------------------------------------------------------------------------- 1 | import PostgresAdapter from '@auth/pg-adapter' 2 | import { Pool } from '@neondatabase/serverless' 3 | import NextAuth from 'next-auth' 4 | import Resend from 'next-auth/providers/resend' 5 | 6 | export const { handlers, auth, signIn, signOut } = NextAuth(() => { 7 | const pool = new Pool({ connectionString: process.env.DATABASE_URL }) 8 | return { 9 | adapter: PostgresAdapter(pool), 10 | providers: [Resend({ from: 'Test ' })], 11 | } 12 | }) 13 | -------------------------------------------------------------------------------- /ai/inngest/rag-starter-nextjs/tailwind.config.ts: -------------------------------------------------------------------------------- 1 | import type { Config } from "tailwindcss"; 2 | 3 | export default { 4 | content: [ 5 | "./src/pages/**/*.{js,ts,jsx,tsx,mdx}", 6 | "./src/components/**/*.{js,ts,jsx,tsx,mdx}", 7 | "./src/app/**/*.{js,ts,jsx,tsx,mdx}", 8 | ], 9 | theme: { 10 | extend: { 11 | colors: { 12 | background: "var(--background)", 13 | foreground: "var(--foreground)", 14 | }, 15 | }, 16 | }, 17 | plugins: [], 18 | } satisfies Config; 19 | -------------------------------------------------------------------------------- /with-analog/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | with-analog 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /with-astro-api-routes/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "module", 3 | "name": "with-astro-api-routes", 4 | "scripts": { 5 | "dev": "astro dev", 6 | "start": "astro dev", 7 | "build": "astro check && astro build", 8 | "preview": "astro preview", 9 | "astro": "astro" 10 | }, 11 | "dependencies": { 12 | "@astrojs/check": "^0.7.0", 13 | "@astrojs/node": "^8.2.5", 14 | "@neondatabase/serverless": "^1.0.0", 15 | "astro": "^4.9.2", 16 | "typescript": "^5.4.5" 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /with-laravel/app/Providers/AppServiceProvider.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | import { defineConfig } from 'vite'; 4 | import analog from '@analogjs/platform'; 5 | 6 | // https://vitejs.dev/config/ 7 | export default defineConfig(({ mode }) => ({ 8 | build: { 9 | target: ['es2020'], 10 | }, 11 | resolve: { 12 | mainFields: ['module'], 13 | }, 14 | plugins: [ 15 | analog({ 16 | ssr: false, 17 | static: true, 18 | prerender: { 19 | routes: [], 20 | }, 21 | }), 22 | ], 23 | })); 24 | -------------------------------------------------------------------------------- /with-nestjs/src/database/database.module.ts: -------------------------------------------------------------------------------- 1 | import { config } from 'dotenv'; 2 | import { Module } from '@nestjs/common'; 3 | import { neon } from '@neondatabase/serverless'; 4 | 5 | config({ 6 | path: ['.env', '.env.production', '.env.local'], 7 | }); 8 | 9 | const sql = neon(process.env.DATABASE_URL); 10 | 11 | const dbProvider = { 12 | provide: 'POSTGRES_POOL', 13 | useValue: sql, 14 | }; 15 | 16 | @Module({ 17 | providers: [dbProvider], 18 | exports: [dbProvider], 19 | }) 20 | export class DatabaseModule {} 21 | -------------------------------------------------------------------------------- /with-bun/using-neon-serverless-driver.ts: -------------------------------------------------------------------------------- 1 | import { neon } from '@neondatabase/serverless'; 2 | 3 | const connectionString = process.env.POSTGRES_URL as string; 4 | 5 | if (!connectionString) { 6 | throw new Error(`Please add a POSTGRES_URL environment variable.`); 7 | } 8 | 9 | // Bun automatically loads the POSTGRES_URL from .env.local 10 | // Refer to: https://bun.sh/docs/runtime/env for more information 11 | const sql = neon(connectionString); 12 | 13 | const rows = await sql`SELECT version()`; 14 | 15 | console.log(rows[0]); 16 | -------------------------------------------------------------------------------- /with-rust-postgres/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "with-rust-postgres" 3 | version = "0.1.0" 4 | edition = "2024" 5 | 6 | [dependencies] 7 | dotenvy = "0.15.7" 8 | openssl = "0.10.73" 9 | postgres = "0.19.10" 10 | postgres-openssl = "0.5.1" 11 | 12 | [[bin]] 13 | name = "create_table" 14 | path = "src/create_table.rs" 15 | 16 | [[bin]] 17 | name = "read_data" 18 | path = "src/read_data.rs" 19 | 20 | [[bin]] 21 | name = "update_data" 22 | path = "src/update_data.rs" 23 | 24 | [[bin]] 25 | name = "delete_data" 26 | path = "src/delete_data.rs" -------------------------------------------------------------------------------- /with-neon-serverless/delete_data.js: -------------------------------------------------------------------------------- 1 | import 'dotenv/config'; 2 | import { neon } from '@neondatabase/serverless'; 3 | 4 | const sql = neon(process.env.DATABASE_URL); 5 | 6 | async function deleteData() { 7 | try { 8 | console.log('Connection established'); 9 | 10 | // Delete a data row from the table 11 | await sql`DELETE FROM books WHERE title = ${'1984'}`; 12 | console.log("Deleted the book '1984' from the table."); 13 | } catch (err) { 14 | console.error('Connection failed.', err); 15 | } 16 | } 17 | 18 | deleteData(); -------------------------------------------------------------------------------- /with_phoenix/test/with_phoenix_web/controllers/error_html_test.exs: -------------------------------------------------------------------------------- 1 | defmodule WithPhoenixWeb.ErrorHTMLTest do 2 | use WithPhoenixWeb.ConnCase, async: true 3 | 4 | # Bring render_to_string/4 for testing custom views 5 | import Phoenix.Template 6 | 7 | test "renders 404.html" do 8 | assert render_to_string(WithPhoenixWeb.ErrorHTML, "404", "html", []) == "Not Found" 9 | end 10 | 11 | test "renders 500.html" do 12 | assert render_to_string(WithPhoenixWeb.ErrorHTML, "500", "html", []) == "Internal Server Error" 13 | end 14 | end 15 | -------------------------------------------------------------------------------- /auth/with-authjs-next/tailwind.config.ts: -------------------------------------------------------------------------------- 1 | import type { Config } from 'tailwindcss' 2 | 3 | const config: Config = { 4 | content: ['./pages/**/*.{js,ts,jsx,tsx,mdx}', './components/**/*.{js,ts,jsx,tsx,mdx}', './app/**/*.{js,ts,jsx,tsx,mdx}'], 5 | theme: { 6 | extend: { 7 | backgroundImage: { 8 | 'gradient-radial': 'radial-gradient(var(--tw-gradient-stops))', 9 | 'gradient-conic': 'conic-gradient(from 180deg at 50% 50%, var(--tw-gradient-stops))', 10 | }, 11 | }, 12 | }, 13 | } 14 | 15 | export default config 16 | -------------------------------------------------------------------------------- /with-neon-serverless/update_data.js: -------------------------------------------------------------------------------- 1 | import 'dotenv/config'; 2 | import { neon } from '@neondatabase/serverless'; 3 | 4 | const sql = neon(process.env.DATABASE_URL); 5 | 6 | async function updateData() { 7 | try { 8 | console.log('Connection established'); 9 | 10 | // Update a data row in the table 11 | await sql`UPDATE books SET in_stock = ${true} WHERE title = ${'Dune'}`; 12 | console.log("Updated stock status for 'Dune'."); 13 | } catch (err) { 14 | console.error('Connection failed.', err); 15 | } 16 | } 17 | 18 | updateData(); -------------------------------------------------------------------------------- /with-solid-start/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "module", 3 | "name": "with-solid-start", 4 | "scripts": { 5 | "dev": "vinxi dev", 6 | "build": "vinxi build", 7 | "start": "vinxi start", 8 | "version": "vinxi version" 9 | }, 10 | "dependencies": { 11 | "@neondatabase/serverless": "^0.9.3", 12 | "@solidjs/meta": "^0.29.4", 13 | "@solidjs/router": "^0.13.3", 14 | "@solidjs/start": "^1.0.1", 15 | "solid-js": "^1.8.17", 16 | "vinxi": "^0.3.11" 17 | }, 18 | "engines": { 19 | "node": ">=18" 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /with-laravel/public/index.php: -------------------------------------------------------------------------------- 1 | handleRequest(Request::capture()); 18 | -------------------------------------------------------------------------------- /with-nuxt/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "module", 3 | "name": "with-nuxt", 4 | "scripts": { 5 | "build": "nuxt build", 6 | "dev": "nuxt dev", 7 | "generate": "nuxt generate", 8 | "preview": "nuxt preview", 9 | "postinstall": "nuxt prepare" 10 | }, 11 | "dependencies": { 12 | "@neondatabase/serverless": "^1.0.0", 13 | "@nuxt/icon": "^1.5.6", 14 | "@nuxtjs/tailwindcss": "^6.12.2", 15 | "nuxt": "^3.13.2", 16 | "vue": "latest" 17 | }, 18 | "devDependencies": { 19 | "@iconify-json/logos": "^1.2.3" 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /with-solid-start/src/app.tsx: -------------------------------------------------------------------------------- 1 | import { MetaProvider, Title } from "@solidjs/meta"; 2 | import { Router } from "@solidjs/router"; 3 | import { FileRoutes } from "@solidjs/start/router"; 4 | import { Suspense } from "solid-js"; 5 | 6 | export default function App() { 7 | return ( 8 | ( 10 | 11 | SolidStart - Basic 12 | {props.children} 13 | 14 | )} 15 | > 16 | 17 | 18 | ); 19 | } 20 | -------------------------------------------------------------------------------- /with_phoenix/lib/with_phoenix_web/components/layouts.ex: -------------------------------------------------------------------------------- 1 | defmodule WithPhoenixWeb.Layouts do 2 | @moduledoc """ 3 | This module holds different layouts used by your application. 4 | 5 | See the `layouts` directory for all templates available. 6 | The "root" layout is a skeleton rendered as part of the 7 | application router. The "app" layout is set as the default 8 | layout on both `use WithPhoenixWeb, :controller` and 9 | `use WithPhoenixWeb, :live_view`. 10 | """ 11 | use WithPhoenixWeb, :html 12 | 13 | embed_templates "layouts/*" 14 | end 15 | -------------------------------------------------------------------------------- /with-nextjs-prisma/.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 | 8 | # testing 9 | /coverage 10 | 11 | # next.js 12 | /.next/ 13 | /out/ 14 | 15 | # production 16 | /build 17 | 18 | # misc 19 | .DS_Store 20 | *.pem 21 | 22 | # debug 23 | npm-debug.log* 24 | yarn-debug.log* 25 | yarn-error.log* 26 | .pnpm-debug.log* 27 | 28 | # local env files 29 | .env 30 | 31 | # vercel 32 | .vercel 33 | 34 | # typescript 35 | *.tsbuildinfo 36 | next-env.d.ts 37 | -------------------------------------------------------------------------------- /with-nodejs/index.js: -------------------------------------------------------------------------------- 1 | require("dotenv").config(); 2 | 3 | const http = require("http"); 4 | const { neon } = require("@neondatabase/serverless"); 5 | 6 | const sql = neon(process.env.DATABASE_URL); 7 | 8 | const requestHandler = async (req, res) => { 9 | const result = await sql`SELECT version()`; 10 | const { version } = result[0]; 11 | res.writeHead(200, { "Content-Type": "text/plain" }); 12 | res.end(version); 13 | }; 14 | 15 | http.createServer(requestHandler).listen(3000, () => { 16 | console.log("Server running at http://localhost:3000"); 17 | }); 18 | -------------------------------------------------------------------------------- /with-prisma/.env.example: -------------------------------------------------------------------------------- 1 | # Environment variables declared in this file are automatically made available to Prisma. 2 | # See the documentation for more detail: https://pris.ly/d/prisma-schema#accessing-environment-variables-from-the-schema 3 | 4 | # Prisma supports the native connection string format for PostgreSQL, MySQL, SQLite, SQL Server, MongoDB and CockroachDB. 5 | # See the documentation for all the connection string options: https://pris.ly/d/connection-strings 6 | 7 | DATABASE_URL="postgresql://neondb_owner:...@ep-...us-east-1.aws.neon.tech/neondb?sslmode=require" 8 | --------------------------------------------------------------------------------