{"id":2627,"date":"2023-07-24T12:39:18","date_gmt":"2023-07-24T03:39:18","guid":{"rendered":"https:\/\/www.agile-software.site\/?p=2627"},"modified":"2023-08-03T08:31:43","modified_gmt":"2023-08-02T23:31:43","slug":"nextjs-supabase-blog","status":"publish","type":"post","link":"https:\/\/agile-software.net\/?p=2627","title":{"rendered":"Next.js 13\u3068Supabase\u3067AI\u753b\u50cf\u751f\u6210\u30a2\u30d7\u30ea\u69cb\u7bc9"},"content":{"rendered":"\n<p>uuid\u3068\u306f<strong>\u4e16\u754c\u4e2d\u3067\u91cd\u8907\u3057\u306a\u3044ID<\/strong>\u306e\u3053\u3068\u3002<br>id\u304c1,2,3\u3068\u9023\u756a\u306b\u306a\u3089\u305a\u8907\u96d1\u306a\u6587\u5b57\u5217\u3092\u4f5c\u308c\u308b<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td><code>uuid_generate_v4()<\/code><\/td><td>\u3053\u306e\u95a2\u6570\u306f\u30d0\u30fc\u30b8\u30e7\u30f34 UUID\u3092\u751f\u6210\u3057\u307e\u3059\u3002<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code><\/code><\/pre><\/div>\n\n\n\n<h2 class=\"wp-block-heading\"><\/h2>\n\n\n\n<p>\u4f5c\u6210\u6e08\u307f\u306e\u30c6\u30fc\u30d6\u30eb\u306b\u5236\u7d04\u3092\u52a0\u3048\u307e\u3059\u3002ALTER TABLE \u30b3\u30de\u30f3\u30c9\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u30b5\u30a4\u30f3\u30a2\u30c3\u30d7\u3059\u308b\u3068\u540c\u6642\u306b\u30d7\u30ed\u30d5\u30a3\u30fc\u30eb\u30c6\u30fc\u30d6\u30eb\u304c\u4f5c\u6210\u3055\u308c\u308b\u3088\u3046\u306b\u3059\u308b\u3002<\/p>\n\n\n\n<p>Next.js 13\u306b\u304a\u3044\u3066\u3001\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u306f\u30b5\u30fc\u30d0\u30fc\u5074\u3067\u30ec\u30f3\u30c0\u30ea\u30f3\u30b0\u3055\u308c\u308b<strong>\u30b5\u30fc\u30d0\u30fc\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8<\/strong>\u304c\u30c7\u30d5\u30a1\u30af\u30c8\u306b\u306a\u308a\u307e\u3057\u305f\u3002<\/p>\n\n\n\n<p>\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u5074\u3067\u30a4\u30f3\u30bf\u30e9\u30af\u30c6\u30a3\u30d6\u306a\u51e6\u7406\u3092\u884c\u3044\u305f\u3044\u5834\u5408\u306f Client Component \u3068\u3057\u3066\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u3092\u8a2d\u5b9a\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"wp-block-jin-gb-block-box-with-headline kaisetsu-box1\"><div class=\"kaisetsu-box1-title\">Sever Component \u3068 Client Component\u306e\u4f7f\u3044\u5206\u3051<\/div>\n<ul class=\"wp-block-list\">\n<li>Fetch data \u306b\u3064\u3044\u3066\u306f Server Component \u3060\u3051\u3067\u306f\u306a\u304f Client Component \u3067\u3082\u884c\u3046\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u304c\u7279\u5225\u306a\u7406\u7531\u304c\u306a\u3051\u308c\u3070 Server Component \u3067\u306e\u5229\u7528\u3092\u63a8\u5968\u3059\u308b\u3068\u8a18\u8f09\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/li>\n\n\n\n<li>\u30a2\u30af\u30bb\u30b9\u30c8\u30fc\u30af\u30f3\u3084 API \u30ad\u30fc\u306a\u3069\u5916\u90e8\u306b\u6f0f\u308c\u3066\u306f\u3044\u3051\u306a\u3044\u60c5\u5831\u3092\u5229\u7528\u3059\u308b\u5834\u5408\u306b\u306f Server Component \u3067\u51e6\u7406\u3092\u884c\u3046\u3053\u3068\u306b\u306a\u308a\u307e\u3059\u3002<\/li>\n\n\n\n<li>click \u30a4\u30d9\u30f3\u30c8\u3084 useState, useEffect, \u30d6\u30e9\u30a6\u30b6\u304c\u6301\u3064 API \u3092\u5229\u7528\u3059\u308b\u5834\u5408\u306f Server Component \u3067\u306f\u5229\u7528\u3067\u304d\u306a\u3044\u306e\u3067 Client Component \u3092\u5229\u7528\u3059\u308b\u3053\u3068\u306b\u306a\u308a\u307e\u3059\u3002<\/li>\n<\/ul>\n<\/div>\n\n\n\n<p>React.js\u3067DOM\u306bCSS\u30af\u30e9\u30b9\u3092\u6307\u5b9a\u3059\u308b\u5834\u5408\u306b\u306f\u3001<code>className<\/code>\u30d7\u30ed\u30d1\u30c6\u30a3\u3092\u4f7f\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>{\/*CSS\u30af\u30e9\u30b9\u3092\u6307\u5b9a\u3059\u308b\u4f8b*\/}\n&lt;div className={&#39;login&#39;}&gt;\n    \u30ed\u30b0\u30a4\u30f3\n&lt;\/div&gt;<\/code><\/pre><\/div>\n\n\n\n<p>\u30bf\u30d6\u306e\u8868\u793a\u3092\u5909\u66f4<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>$ npx create-next-app@latest .\n&#x2714; Would you like to use TypeScript? \u2026 No \/ Yes\n&#x2714; Would you like to use ESLint? \u2026 No \/ Yes\n&#x2714; Would you like to use Tailwind CSS? \u2026 No \/ Yes\n&#x2714; Would you like to use `src\/` directory? \u2026 No \/ Yes\n&#x2714; Would you like to use App Router? (recommended) \u2026 No \/ Yes\n&#x2714; Would you like to customize the default import alias? \u2026 No \/ Yes<\/code><\/pre><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">OpenAI \u306e API \u30ad\u30fc\u3092\u53d6\u5f97<\/h2>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>uuid\u3068\u306f\u4e16\u754c\u4e2d\u3067\u91cd\u8907\u3057\u306a\u3044ID\u306e\u3053\u3068\u3002id\u304c1,2,3\u3068\u9023\u756a\u306b\u306a\u3089\u305a\u8907\u96d1\u306a\u6587\u5b57\u5217\u3092\u4f5c\u308c\u308b uuid_generate_v4() \u3053\u306e\u95a2\u6570\u306f\u30d0\u30fc\u30b8\u30e7\u30f34 UUID\u3092\u751f\u6210\u3057\u307e\u3059\u3002 \u4f5c\u6210\u6e08\u307f\u306e\u30c6\u30fc\u30d6\u30eb\u306b\u5236\u7d04\u3092\u52a0\u3048\u307e\u3059\u3002AL<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jin_ogp_image_url":"","_jin_last_featured_id":0,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-2627","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/agile-software.net\/index.php?rest_route=\/wp\/v2\/posts\/2627","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/agile-software.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/agile-software.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/agile-software.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/agile-software.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2627"}],"version-history":[{"count":4,"href":"https:\/\/agile-software.net\/index.php?rest_route=\/wp\/v2\/posts\/2627\/revisions"}],"predecessor-version":[{"id":2756,"href":"https:\/\/agile-software.net\/index.php?rest_route=\/wp\/v2\/posts\/2627\/revisions\/2756"}],"wp:attachment":[{"href":"https:\/\/agile-software.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2627"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/agile-software.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2627"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/agile-software.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2627"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}