-
Notifications
You must be signed in to change notification settings - Fork 42
atribot #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
atribot #1
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,45 +1,5 @@ | ||
| # Better Auth Starter | ||
| # AtriBot | ||
|
|
||
|  | ||
| AtriBot is a robotics learing platform. It is built using Next.js, Drizzle, Neon, and Better Auth. | ||
|
|
||
| ## Overview | ||
|
|
||
| The Better Auth Starter is simple starter pack using Next.js, Better Auth, Shadcn, Drizzle, and Neon | ||
|
|
||
| ## Getting Started | ||
|
|
||
| ### Installation | ||
|
|
||
| To begin, install the required dependencies using the following command: | ||
|
|
||
| ```bash | ||
| pnpm i | ||
| ``` | ||
|
|
||
| ### Configuration | ||
|
|
||
| Create a copy of the provided `env.example` file and name it `.env`. Fill in the required OpenAI API Key in the newly created `.env` file, and Better Auth variables if you're going to use authentication: | ||
|
|
||
| `cp env.example .env` | ||
|
|
||
| ```bash | ||
| BETTER_AUTH_SECRET="your-better-auth-secret" | ||
| BETTER_AUTH_URL="http://localhost:3000" | ||
|
|
||
| DATABASE_URL="your-database-url" | ||
|
|
||
| GOOGLE_CLIENT_ID="your-google-client-id" | ||
| GOOGLE_CLIENT_SECRET="your-google-client-secret" | ||
| ``` | ||
|
|
||
| Make sure to replace placeholder values with your actual API keys, and keep them safe! | ||
|
|
||
| # Development Server | ||
|
|
||
| After installing the dependencies, and adding configuration variables run the development server: | ||
|
|
||
| ```bash | ||
| pnpm dev | ||
| ``` | ||
|
|
||
| Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| [build] | ||
| command = "npm run build" | ||
| publish = ".next" | ||
|
Comment on lines
+1
to
+3
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Verify publish directory matches Next.js export configuration. The publish directory is set to #!/bin/bash
# Description: Check Next.js documentation for correct export output directory
# Expected: Should clarify the correct publish directory for export mode
echo "Checking for Next.js export output configuration..."
rg -A 5 -B 5 "output.*export" --type ts --type jsConsider updating the publish directory: [build]
command = "npm run build"
- publish = ".next"
+ publish = "out"🤖 Prompt for AI Agents |
||
|
|
||
| [build.environment] | ||
| NODE_VERSION = "20" | ||
| NPM_FLAGS = "--legacy-peer-deps" | ||
|
|
||
| [[plugins]] | ||
| package = "@netlify/plugin-nextjs" | ||
|
|
||
| [[redirects]] | ||
| from = "/api/*" | ||
| to = "/api/:splat" | ||
| status = 200 | ||
|
|
||
| [[headers]] | ||
| for = "/*" | ||
| [headers.values] | ||
| X-Frame-Options = "DENY" | ||
| X-Content-Type-Options = "nosniff" | ||
| X-XSS-Protection = "1; mode=block" | ||
| Referrer-Policy = "strict-origin-when-cross-origin" | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,53 @@ | ||
| import type { NextConfig } from "next"; | ||
|
|
||
| const nextConfig: NextConfig = { | ||
| /* config options here */ | ||
| images: { | ||
| domains: ['lh3.googleusercontent.com', 'avatars.githubusercontent.com'], | ||
| }, | ||
| async headers() { | ||
| return [ | ||
| { | ||
| source: '/api/:path*', | ||
| headers: [ | ||
| { key: 'Access-Control-Allow-Credentials', value: 'true' }, | ||
| { | ||
| key: 'Access-Control-Allow-Origin', | ||
| value: process.env.NODE_ENV === 'production' | ||
| ? 'https://atribot.com' | ||
| : 'http://localhost:3000' | ||
| }, | ||
| { key: 'Access-Control-Allow-Methods', value: 'GET,OPTIONS,PATCH,DELETE,POST,PUT' }, | ||
| { key: 'Access-Control-Allow-Headers', value: 'X-Requested-With, X-Auth-Token, Content-Type, Authorization' }, | ||
| ] | ||
| } | ||
| ] | ||
| }, | ||
|
Comment on lines
+7
to
+24
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Verification agent 🧩 Analysis chainVerify CORS configuration aligns with actual deployment domains. The CORS setup looks comprehensive, but ensure the production origin matches your actual domain. The configuration currently uses 🏁 Script executed: #!/bin/bash
# Description: Check if atribot.com domain is referenced consistently across the codebase
# Expected: Should find consistent usage of the domain
echo "Searching for domain references in the codebase..."
rg -i "atribot\.com" --type-add 'config:*.{ts,js,json,toml,md}' -t configLength of output: 310 Ensure CORS domains are consistent across configurations We found two references to your production domain in the codebase:
To avoid mismatches (since browsers send the Origin header with protocol), update the allowedOrigins entry to use full origin strings. For example: - allowedOrigins: ['localhost:3000', 'atribot.com']
+ allowedOrigins: ['http://localhost:3000', 'https://atribot.com']This keeps your CORS checks in sync with the values returned by headers().
🤖 Prompt for AI Agents |
||
| // Disable static optimization for all pages | ||
| output: 'standalone', | ||
| // Configure page revalidation (ISR) | ||
| experimental: { | ||
| // Enable server actions | ||
| serverActions: { | ||
| bodySizeLimit: '2mb', | ||
| allowedOrigins: ['localhost:3000', 'atribot.com'] | ||
| }, | ||
| }, | ||
| typescript: { | ||
| // Skip TypeScript checking during build to catch errors earlier | ||
| ignoreBuildErrors: false, | ||
| }, | ||
| eslint: { | ||
| // Don't fail build on ESLint errors | ||
| ignoreDuringBuilds: true | ||
| }, | ||
| }; | ||
|
|
||
| // For Netlify deployment | ||
| if (process.env.NETLIFY === 'true') { | ||
| nextConfig.output = 'export'; | ||
| nextConfig.images = { | ||
| unoptimized: true, | ||
| }; | ||
| } | ||
|
|
||
| export default nextConfig; | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix spelling error in project description.
There's a typo in "learing" which should be "learning".
📝 Committable suggestion
🧰 Tools
🪛 LanguageTool
[grammar] ~3-~3: Ensure spelling is correct
Context: # AtriBot AtriBot is a robotics learing platform. It is built using Next.js, Dr...
(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)
🤖 Prompt for AI Agents