0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2025-03-10 22:22:45 -05:00

feat(console): add a hook to return all application guide metadata (#4333)

* feat(console): consolidate all app guide metadata and use it with a hook

* fix: disable "no-unused-modules" lint rule and use it in follow-up PRs
This commit is contained in:
Charles Zhao 2023-08-16 12:53:03 +08:00 committed by GitHub
parent e3399cbefe
commit c7a4eeb9a5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
48 changed files with 534 additions and 95 deletions

View file

@ -47,7 +47,8 @@ await fs.appendFile(filename, '\n');
await fs.appendFile(filename, 'const guides: Readonly<Guide[]> = Object.freeze([');
for (const { name, logo } of metadata) {
fs.appendFile(
// eslint-disable-next-line no-await-in-loop
await fs.appendFile(
filename,
`
{

View file

@ -2,80 +2,142 @@
import { lazy } from 'react';
import m2mGeneral from './m2m-general/index';
import nativeAndroidJava from './native-android-java/index';
import nativeAndroidKt from './native-android-kt/index';
import nativeCapacitor from './native-capacitor/index';
import nativeFlutter from './native-flutter/index';
import nativeIosSwift from './native-ios-swift/index';
import spaReact from './spa-react/index';
import spaRemix from './spa-remix/index';
import spaVanilla from './spa-vanilla/index';
import spaVue from './spa-vue/index';
import { type Guide } from './types';
import webChatgpt from './web-chatgpt/index';
import webCsharp from './web-csharp/index';
import webExpress from './web-express/index';
import webGo from './web-go/index';
import webJava from './web-java/index';
import webNext from './web-next/index';
import webNextAppRouter from './web-next-app-router/index';
import webPhp from './web-php/index';
import webPython from './web-python/index';
const guides: Readonly<Guide[]> = Object.freeze([
{
id: 'm2m-general',
Logo: lazy(async () => import('./m2m-general/logo.svg')),
Component: lazy(async () => import('./m2m-general/README.mdx')),
metadata: m2mGeneral,
},
{
id: 'native-android-java',
Logo: lazy(async () => import('./native-android-java/logo.svg')),
Component: lazy(async () => import('./native-android-java/README.mdx')),
metadata: nativeAndroidJava,
},
{
id: 'native-android-kt',
Logo: lazy(async () => import('./native-android-kt/logo.svg')),
Component: lazy(async () => import('./native-android-kt/README.mdx')),
metadata: nativeAndroidKt,
},
{
id: 'native-capacitor',
Logo: lazy(async () => import('./native-capacitor/logo.svg')),
Component: lazy(async () => import('./native-capacitor/README.mdx')),
metadata: nativeCapacitor,
},
{
id: 'native-flutter',
Logo: lazy(async () => import('./native-flutter/logo.svg')),
Component: lazy(async () => import('./native-flutter/README.mdx')),
metadata: nativeFlutter,
},
{
id: 'native-ios-swift',
Logo: lazy(async () => import('./native-ios-swift/logo.svg')),
Component: lazy(async () => import('./native-ios-swift/README.mdx')),
metadata: nativeIosSwift,
},
{
id: 'spa-react',
Logo: lazy(async () => import('./spa-react/logo.svg')),
Component: lazy(async () => import('./spa-react/README.mdx')),
metadata: spaReact,
},
{
id: 'spa-remix',
Logo: lazy(async () => import('./spa-remix/logo.svg')),
Component: lazy(async () => import('./spa-remix/README.mdx')),
metadata: spaRemix,
},
{
id: 'spa-vanilla',
Logo: lazy(async () => import('./spa-vanilla/logo.svg')),
Component: lazy(async () => import('./spa-vanilla/README.mdx')),
metadata: spaVanilla,
},
{
id: 'spa-vue',
Logo: lazy(async () => import('./spa-vue/logo.svg')),
Component: lazy(async () => import('./spa-vue/README.mdx')),
metadata: spaVue,
},
{
id: 'web-chatgpt',
Logo: lazy(async () => import('./web-chatgpt/logo.svg')),
Component: lazy(async () => import('./web-chatgpt/README.mdx')),
metadata: webChatgpt,
},
{
id: 'web-csharp',
Logo: lazy(async () => import('./web-csharp/logo.svg')),
Component: lazy(async () => import('./web-csharp/README.mdx')),
metadata: webCsharp,
},
{
id: 'web-express',
Logo: lazy(async () => import('./web-express/logo.svg')),
Component: lazy(async () => import('./web-express/README.mdx')),
metadata: webExpress,
},
{
id: 'web-go',
Logo: lazy(async () => import('./web-go/logo.svg')),
Component: lazy(async () => import('./web-go/README.mdx')),
metadata: webGo,
},
{
id: 'web-java',
Logo: lazy(async () => import('./web-java/logo.svg')),
Component: lazy(async () => import('./web-java/README.mdx')),
metadata: webJava,
},
{
id: 'web-next',
Logo: lazy(async () => import('./web-next/logo.svg')),
Component: lazy(async () => import('./web-next/README.mdx')),
metadata: webNext,
},
{
id: 'web-next-app-router',
Logo: lazy(async () => import('./web-next-app-router/logo.svg')),
Component: lazy(async () => import('./web-next-app-router/README.mdx')),
metadata: webNextAppRouter,
},
{
id: 'web-php',
Logo: lazy(async () => import('./web-php/logo.svg')),
Component: lazy(async () => import('./web-php/README.mdx')),
metadata: webPhp,
},
{
id: 'web-python',
Logo: lazy(async () => import('./web-python/logo.svg')),
Component: lazy(async () => import('./web-python/README.mdx')),
metadata: webPython,
},
]);
export default guides;

View file

@ -0,0 +1 @@
## Replace this with actual guide

View file

@ -0,0 +1,12 @@
import { ApplicationType } from '@logto/schemas';
import { type GuideMetadata } from '../types';
const metadata: Readonly<GuideMetadata> = Object.freeze({
name: 'Machine-to-machine',
description: 'Enables direct communication between machines.',
target: ApplicationType.MachineToMachine,
isFeatured: true,
});
export default metadata;

View file

@ -0,0 +1,37 @@
<svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M20.4001 7.20005C20.4001 5.87457 21.4747 4.80005 22.8002 4.80005H39.6003C40.9258 4.80005 42.0003 5.87457 42.0003 7.20005V19.2C42.0003 20.5255 40.9258 21.6 39.6003 21.6H22.8002C21.4747 21.6 20.4001 20.5255 20.4001 19.2V7.20005Z" fill="url(#paint0_linear_134_42614)"/>
<rect x="20.4001" y="9.6001" width="21.6002" height="1.2" fill="#D361E7"/>
<path d="M32.4001 7.79995C32.4001 7.46858 32.6688 7.19995 33.0002 7.19995H39.0002C39.3316 7.19995 39.6002 7.46858 39.6002 7.79995C39.6002 8.13132 39.3316 8.39995 39.0002 8.39995H33.0002C32.6688 8.39995 32.4001 8.13132 32.4001 7.79995Z" fill="#B545CA"/>
<rect x="22.8" y="7.19995" width="1.20001" height="1.2" rx="0.6" fill="#F4E560"/>
<path d="M32.4001 13.8C32.4001 13.4686 32.6688 13.2 33.0002 13.2H39.0002C39.3316 13.2 39.6002 13.4686 39.6002 13.8C39.6002 14.1313 39.3316 14.4 39.0002 14.4H33.0002C32.6688 14.4 32.4001 14.1313 32.4001 13.8Z" fill="#B545CA"/>
<rect x="22.8" y="13.2" width="1.20001" height="1.2" rx="0.6" fill="#7958FF"/>
<rect x="25.2" y="13.2" width="1.20001" height="1.2" rx="0.6" fill="#F4E560"/>
<path d="M32.4001 19.8C32.4001 19.4686 32.6688 19.2 33.0002 19.2H39.0002C39.3316 19.2 39.6002 19.4686 39.6002 19.8C39.6002 20.1313 39.3316 20.4 39.0002 20.4H33.0002C32.6688 20.4 32.4001 20.1313 32.4001 19.8Z" fill="#B545CA"/>
<rect x="22.8" y="19.2" width="1.20001" height="1.2" rx="0.599999" fill="#F4E560"/>
<rect x="25.2" y="19.2" width="1.20001" height="1.2" rx="0.599999" fill="#F4E560"/>
<rect x="20.4001" y="15.6001" width="21.6002" height="1.2" fill="#D361E7"/>
<path d="M6 28.7999C6 27.4744 7.07452 26.3999 8.40002 26.3999H25.2001C26.5256 26.3999 27.6002 27.4744 27.6002 28.7999V40.7999C27.6002 42.1254 26.5256 43.1999 25.2001 43.1999H8.40002C7.07452 43.1999 6 42.1254 6 40.7999V28.7999Z" fill="url(#paint1_linear_134_42614)"/>
<rect x="6" y="31.2" width="21.6002" height="1.2" fill="#947DFF"/>
<path d="M18 29.3998C18 29.0684 18.2686 28.7998 18.6 28.7998H24.6C24.9314 28.7998 25.2001 29.0684 25.2001 29.3998C25.2001 29.7312 24.9314 29.9998 24.6 29.9998H18.6C18.2686 29.9998 18 29.7312 18 29.3998Z" fill="#7958FF"/>
<rect x="8.3999" y="28.7998" width="1.20001" height="1.2" rx="0.6" fill="#FFEAFE"/>
<path d="M18 35.3998C18 35.0684 18.2686 34.7998 18.6 34.7998H24.6C24.9314 34.7998 25.2001 35.0684 25.2001 35.3998C25.2001 35.7312 24.9314 35.9998 24.6 35.9998H18.6C18.2686 35.9998 18 35.7312 18 35.3998Z" fill="#7958FF"/>
<rect x="8.3999" y="34.7998" width="1.20001" height="1.2" rx="0.6" fill="#FFEAFE"/>
<rect x="10.7998" y="34.7998" width="1.20001" height="1.2" rx="0.6" fill="#FFEAFE"/>
<path d="M18 41.3998C18 41.0684 18.2686 40.7998 18.6 40.7998H24.6C24.9314 40.7998 25.2001 41.0684 25.2001 41.3998C25.2001 41.7312 24.9314 41.9998 24.6 41.9998H18.6C18.2686 41.9998 18 41.7312 18 41.3998Z" fill="#7958FF"/>
<rect x="8.3999" y="40.7998" width="1.20001" height="1.2" rx="0.6" fill="#FFEAFE"/>
<rect x="10.7998" y="40.7998" width="1.20001" height="1.2" rx="0.6" fill="#FFEAFE"/>
<rect x="6" y="37.2" width="21.6002" height="1.2" fill="#947DFF"/>
<g style="mix-blend-mode:multiply">
<path d="M24.0002 32.3999C29.3022 32.3999 33.6003 28.1018 33.6003 22.7999M14.4001 23.9999C14.4001 18.698 18.6982 14.3999 24.0002 14.3999" stroke="#C9C5D0" stroke-width="2"/>
</g>
<defs>
<linearGradient id="paint0_linear_134_42614" x1="15.0001" y1="16" x2="43.6975" y2="11.975" gradientUnits="userSpaceOnUse">
<stop stop-color="#E4A3FB"/>
<stop offset="1" stop-color="#EC78FF"/>
</linearGradient>
<linearGradient id="paint1_linear_134_42614" x1="4.2257" y1="36.0249" x2="25.6354" y2="25.8611" gradientUnits="userSpaceOnUse">
<stop stop-color="#492EF3"/>
<stop offset="1" stop-color="#CF69FF"/>
</linearGradient>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 3.7 KiB

View file

@ -1,8 +1,11 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32">
<path
d="M11.622 24.74s-1.23.748.855.962c2.51.32 3.847.267 6.625-.267a10.02 10.02 0 0 0 1.763.855c-6.25 2.672-14.16-.16-9.244-1.55zm-.8-3.473s-1.336 1.015.748 1.23c2.725.267 4.862.32 8.55-.427a3.26 3.26 0 0 0 1.282.801c-7.534 2.244-15.976.214-10.58-1.603zm14.747 6.09s.908.748-1.015 1.336c-3.58 1.07-15.014 1.39-18.22 0-1.122-.48 1.015-1.175 1.7-1.282.695-.16 1.07-.16 1.07-.16-1.23-.855-8.175 1.763-3.526 2.51 12.77 2.084 23.296-.908 19.983-2.404zM12.2 17.633s-5.824 1.39-2.084 1.87c1.603.214 4.755.16 7.694-.053 2.404-.214 4.81-.64 4.81-.64s-.855.374-1.443.748c-5.93 1.55-17.312.855-14.052-.748 2.778-1.336 5.076-1.175 5.076-1.175zm10.42 5.824c5.984-3.1 3.206-6.09 1.282-5.717-.48.107-.695.214-.695.214s.16-.32.534-.427c3.794-1.336 6.786 4.007-1.23 6.09 0 0 .053-.053.107-.16zm-9.83 8.442c5.77.374 14.587-.214 14.8-2.94 0 0-.427 1.07-4.755 1.87-4.916.908-11.007.8-14.587.214 0 0 .748.64 4.542.855z"
fill="#4e7896" />
<path
d="M18.996.001s3.313 3.366-3.152 8.442c-5.183 4.114-1.175 6.465 0 9.137-3.046-2.725-5.236-5.13-3.74-7.373C14.294 6.893 20.332 5.3 18.996.001zm-1.7 15.335c1.55 1.763-.427 3.366-.427 3.366s3.954-2.03 2.137-4.542c-1.656-2.404-2.94-3.58 4.007-7.587 0 0-10.953 2.725-5.717 8.763z"
fill="#f58219" />
<svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0_129_35349)">
<path d="M19.3484 33.2862C19.3484 33.2862 18.0415 34.081 20.2568 34.3084C22.9237 34.6484 24.3443 34.5921 27.2959 34.0247C27.8891 34.388 28.5165 34.6922 29.1691 34.9331C22.5285 37.7721 14.1252 34.7631 19.3484 33.2862ZM18.4984 29.5962C18.4984 29.5962 17.0789 30.6746 19.2932 30.9031C22.1885 31.1867 24.459 31.2431 28.3775 30.4494C28.7586 30.8359 29.2252 31.1274 29.7397 31.3004C21.7348 33.6847 12.7652 31.5267 18.4984 29.5962ZM34.1671 36.0668C34.1671 36.0668 35.1319 36.8616 33.0887 37.4863C29.2849 38.6232 17.1363 38.9632 13.7299 37.4863C12.5378 36.9763 14.8083 36.2379 15.5362 36.1242C16.2746 35.9542 16.673 35.9542 16.673 35.9542C15.3662 35.0457 7.9871 37.8274 12.9267 38.6211C26.4948 40.8353 37.6787 37.6563 34.1586 36.0668H34.1671ZM19.9625 25.7351C19.9625 25.7351 13.7745 27.2119 17.7483 27.7219C19.4515 27.9493 22.8005 27.8919 25.9232 27.6656C28.4774 27.4382 31.0338 26.9856 31.0338 26.9856C31.0338 26.9856 30.1253 27.383 29.5006 27.7804C23.2 29.4272 11.1066 28.6888 14.5703 26.9856C17.522 25.5661 19.9636 25.7372 19.9636 25.7372L19.9625 25.7351ZM31.0338 31.9231C37.3918 28.6293 34.4402 25.4524 32.3959 25.8487C31.8859 25.9624 31.6575 26.0761 31.6575 26.0761C31.6575 26.0761 31.8275 25.7361 32.2248 25.6224C36.256 24.2029 39.435 29.8799 30.918 32.0931C30.918 32.0931 30.9743 32.0367 31.0317 31.9231H31.0338ZM20.5894 40.8927C26.72 41.2901 36.0881 40.6653 36.3144 37.7689C36.3144 37.7689 35.8607 38.9058 31.2622 39.7558C26.039 40.7206 19.5673 40.6058 15.7635 39.9832C15.7635 39.9832 16.5583 40.6642 20.5894 40.8927Z" fill="#4E7896"/>
<path d="M27.1834 7.00104C27.1834 7.00104 30.7034 10.5774 23.8344 15.9707C18.3274 20.3418 22.5859 22.8397 23.8344 25.6787C20.598 22.7834 18.2711 20.2281 19.8606 17.8449C22.1875 14.3238 28.6029 12.6312 27.1834 7.00104ZM25.3771 23.2945C27.024 25.1677 24.9234 26.8708 24.9234 26.8708C24.9234 26.8708 29.1245 24.714 27.194 22.045C25.4345 19.4907 24.0702 18.2412 31.4514 13.9838C31.4514 13.9838 19.8139 16.8791 25.3771 23.2945Z" fill="#F58219"/>
</g>
<defs>
<clipPath id="clip0_129_35349">
<rect width="34" height="34" fill="white" transform="translate(7 7)"/>
</clipPath>
</defs>
</svg>

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

View file

@ -1,25 +1,33 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
viewBox="0 0 8.64 8.633">
<defs>
<linearGradient id="A" x1="2.039" y1="11.659" x2="9.95" y2="3.748"
gradientUnits="userSpaceOnUse">
<stop offset=".108" stop-color="#c757bc" />
<stop offset=".173" stop-color="#cd5ca9" />
<stop offset=".492" stop-color="#e8744f" />
<stop offset=".716" stop-color="#f88316" />
<stop offset=".823" stop-color="#ff8900" />
</linearGradient>
<linearGradient id="B" gradientUnits="userSpaceOnUse">
<stop offset=".296" stop-color="#00afff" />
<stop offset=".694" stop-color="#5282ff" />
<stop offset="1" stop-color="#945dff" />
</linearGradient>
<linearGradient id="C" x1="3.369" y1="6.189" x2="6.073" y2="3.484" xlink:href="#B" />
<linearGradient xlink:href="#B" id="D" x1="6.184" y1="13.878" x2="10.04" y2="10.022" />
</defs>
<g transform="matrix(1.016327 0 0 1.016327 -3.52726 -3.909123)">
<path d="M7.74 3.843L3.47 8.33v4.013l4.262-4.27 4.24-4.232z" fill="url(#A)" />
<path d="M3.47 12.344l4.262-4.27 4.24 4.27z" fill="url(#D)" />
<path d="M3.47 3.843H7.74L3.47 8.33z" fill="url(#C)" />
</g>
<svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0_129_41966)">
<path d="M9 38.9996L24.05 23.9496L39 38.9996H9Z" fill="url(#paint0_linear_129_41966)"/>
<path d="M9 9H24.05L9 25.25V9Z" fill="url(#paint1_linear_129_41966)"/>
<path d="M24.05 9L9 24.85V39L24.05 23.95L39 9H24.05Z" fill="url(#paint2_linear_129_41966)"/>
</g>
<defs>
<linearGradient id="paint0_linear_129_41966" x1="16.9797" y1="46.0068" x2="31.1534" y2="31.833" gradientUnits="userSpaceOnUse">
<stop offset="0.09677" stop-color="#0095D5"/>
<stop offset="0.3007" stop-color="#238AD9"/>
<stop offset="0.6211" stop-color="#557BDE"/>
<stop offset="0.8643" stop-color="#7472E2"/>
<stop offset="1" stop-color="#806EE3"/>
</linearGradient>
<linearGradient id="paint1_linear_129_41966" x1="11.1046" y1="15.0295" x2="19.3367" y2="6.7975" gradientUnits="userSpaceOnUse">
<stop offset="0.1183" stop-color="#0095D5"/>
<stop offset="0.4178" stop-color="#3C83DC"/>
<stop offset="0.6962" stop-color="#6D74E1"/>
<stop offset="0.8333" stop-color="#806EE3"/>
</linearGradient>
<linearGradient id="paint2_linear_129_41966" x1="3.94915" y1="36.5819" x2="31.8658" y2="8.6653" gradientUnits="userSpaceOnUse">
<stop offset="0.1075" stop-color="#C757BC"/>
<stop offset="0.2138" stop-color="#D0609A"/>
<stop offset="0.4254" stop-color="#E1725C"/>
<stop offset="0.6048" stop-color="#EE7E2F"/>
<stop offset="0.743" stop-color="#F58613"/>
<stop offset="0.8232" stop-color="#F88909"/>
</linearGradient>
<clipPath id="clip0_129_41966">
<rect width="30" height="30" fill="white" transform="translate(9 9)"/>
</clipPath>
</defs>
</svg>

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

View file

@ -0,0 +1 @@
## Replace this with actual guide

View file

@ -0,0 +1,11 @@
import { ApplicationType } from '@logto/schemas';
import { type GuideMetadata } from '../types';
const metadata: Readonly<GuideMetadata> = Object.freeze({
name: 'Capacitor JS',
description: 'Capacitor JS is a framework for building hybrid mobile apps.',
target: ApplicationType.Native,
});
export default metadata;

View file

@ -0,0 +1,8 @@
<svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M12.9828 14.7643L8.03882 19.7145L15.6633 27.3618L8 35.0481L12.9285 40.0005L20.6073 32.3121L28.2444 39.9456L33.1884 34.9953L12.9828 14.7643Z" fill="#53B9FF"/>
<path d="M25.5647 27.362L20.6074 32.3122L28.2445 39.9458L33.1885 34.9955L25.5647 27.362Z" fill="#119EFF"/>
<path d="M25.5647 27.362L20.6074 32.3122L22.5157 34.2099L25.5647 27.362Z" fill="black" fill-opacity="0.2"/>
<path d="M32.3213 20.6231L40.0001 12.9347L35.0539 8L27.3774 15.6729L19.7397 8.03887L14.7957 12.9891L35.0013 33.2201L39.9453 28.2699L32.3213 20.6231Z" fill="#53B9FF"/>
<path d="M22.4201 20.6233L27.3774 15.673L19.7397 8.03897L14.7957 12.9892L22.4201 20.6233Z" fill="#119EFF"/>
<path d="M22.4199 20.6232L27.3773 15.673L25.4685 13.7748L22.4199 20.6232Z" fill="black" fill-opacity="0.2"/>
</svg>

After

Width:  |  Height:  |  Size: 869 B

View file

@ -0,0 +1 @@
## Replace this with actual guide

View file

@ -0,0 +1,11 @@
import { ApplicationType } from '@logto/schemas';
import { type GuideMetadata } from '../types';
const metadata: Readonly<GuideMetadata> = Object.freeze({
name: 'Flutter',
description: 'Flutter is a framework for building hybrid mobile apps.',
target: ApplicationType.Native,
});
export default metadata;

View file

@ -0,0 +1,18 @@
<svg width="49" height="48" viewBox="0 0 49 48" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M36.7944 22.6922H26.3335L17.1807 31.8469L22.4093 37.0765L36.7944 22.6922Z" fill="#54C5F8"/>
<path d="M14.5646 29.2317L9.33325 24.0003L26.3336 7H36.7945L14.5646 29.2317Z" fill="#54C5F8"/>
<path d="M22.4094 37.076L26.3336 41.0002H36.7945L27.6417 31.8465L22.4094 37.076Z" fill="#01579B"/>
<path d="M22.4094 37.076L30.1681 34.3913L27.6417 31.8465L22.4094 37.076Z" fill="url(#paint0_linear_129_35429)"/>
<path d="M22.4102 26.6155L17.1797 31.8462L22.4102 37.0767L27.6408 31.8462L22.4102 26.6155Z" fill="#29B6F6"/>
<path d="M36.7945 22.6923L27.6407 31.8459L36.7945 40.9997H26.3336L22.4103 37.0765L17.1789 31.8451L26.3327 22.6913L36.7945 22.6923ZM26.3336 7L9.33325 24.0003L14.5646 29.2317L36.7945 7H26.3336Z" fill="url(#paint1_radial_129_35429)"/>
<defs>
<linearGradient id="paint0_linear_129_35429" x1="23.9358" y1="38.0866" x2="27.8316" y2="34.1906" gradientUnits="userSpaceOnUse">
<stop stop-color="#1A237E" stop-opacity="0.4"/>
<stop offset="1" stop-color="#1A237E" stop-opacity="0"/>
</linearGradient>
<radialGradient id="paint1_radial_129_35429" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(10.1061 9.31795) scale(41.5973)">
<stop stop-color="white" stop-opacity="0.1"/>
<stop offset="1" stop-color="white" stop-opacity="0"/>
</radialGradient>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 1.4 KiB

View file

@ -10,6 +10,7 @@ const metadata: Readonly<GuideMetadata> = Object.freeze({
repo: 'swift',
path: 'Demos/SwiftUI%20Demo',
},
isFeatured: true,
});
export default metadata;

View file

@ -1,20 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<svg viewBox="0 0 256 256" version="1.1" xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink" preserveAspectRatio="xMidYMid">
<linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="-1845.5007" y1="1255.6392"
x2="-1797.1339" y2="981.3379" gradientTransform="matrix(-1 0 0 -1 -1693.2107 1246.5044)">
<stop offset="0" style="stop-color:#FAAE42" />
<stop offset="1" style="stop-color:#EF3E31" />
</linearGradient>
<path fill="url(#SVGID_1_)"
d="M56.9,0c1.5,0,139.3,0,141.8,0c6.9,0,13.6,1.1,20.1,3.4c9.4,3.4,17.9,9.4,24.3,17.2c6.5,7.8,10.8,17.4,12.3,27.4c0.6,3.7,0.7,7.4,0.7,11.1c0,3.4,0,123.2,0,128.6c0,3.2,0,6.5,0,9.7c0,4.4-0.2,8.9-1.1,13.2c-2,9.9-6.7,19.2-13.5,26.7c-6.7,7.5-15.5,13.1-25,16.1c-5.8,1.8-11.8,2.6-17.9,2.6c-2.7,0-142.1,0-144.2-0.1c-10.2-0.5-20.3-3.8-28.8-9.5c-8.3-5.6-15.1-13.4-19.5-22.4c-3.8-7.7-5.7-16.3-5.7-24.9c0-2,0-140.2,0-142.2C0.2,48.4,2,40,5.7,32.4c4.3-9,11-16.9,19.3-22.5c8.5-5.8,18.5-9.2,28.7-9.7C54.7,0,55.8,0,56.9,0z" />
<linearGradient id="SVGID_2_" gradientUnits="userSpaceOnUse" x1="130.6117" y1="4.1363"
x2="95.213" y2="204.8927">
<stop offset="0" style="stop-color:#E39F3A" />
<stop offset="1" style="stop-color:#D33929" />
</linearGradient>
<path fill="url(#SVGID_2_)"
d="M216,209.4c-0.9-1.4-1.9-2.8-3-4.1c-2.5-3-5.4-5.6-8.6-7.8c-4-2.7-8.7-4.4-13.5-4.6c-3.4-0.2-6.8,0.4-10,1.6c-3.2,1.1-6.3,2.7-9.3,4.3c-3.5,1.8-7,3.6-10.7,5.1c-4.4,1.8-9,3.2-13.7,4.2c-5.9,1.1-11.9,1.5-17.8,1.4c-10.7-0.2-21.4-1.8-31.6-4.8c-9-2.7-17.6-6.4-25.7-11.1c-7.1-4.1-13.7-8.8-19.9-14.1c-5.1-4.4-9.8-9.1-14.2-14.1c-3-3.5-5.9-7.2-8.6-11c-1.1-1.5-2.1-3.1-3-4.7c0,0,0,0,0,0c0,0,0,0,0,0L0,121.2V56.7C0,25.4,25.3,0,56.6,0h50.5l37.4,38c0,0,0,0,0,0c84.4,57.4,57.1,120.7,57.1,120.7S225.6,185.7,216,209.4z" />
<path fill="#FFFFFF"
d="M144.7,38c84.4,57.4,57.1,120.7,57.1,120.7s24,27.1,14.3,50.8c0,0-9.9-16.6-26.5-16.6c-16,0-25.4,16.6-57.6,16.6c-71.7,0-105.6-59.9-105.6-59.9C91,192.1,135.1,162,135.1,162c-29.1-16.9-91-97.7-91-97.7c53.9,45.9,77.2,58,77.2,58c-13.9-11.5-52.9-67.7-52.9-67.7c31.2,31.6,93.2,75.7,93.2,75.7C179.2,81.5,144.7,38,144.7,38z" />
<svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M39.998 16.8634C39.9961 16.5415 39.9926 16.2199 39.9837 15.8977C39.9649 15.1968 39.9235 14.4896 39.7989 13.7962C39.6725 13.092 39.4659 12.4373 39.1402 11.7976C38.8206 11.1694 38.4027 10.5946 37.9042 10.0961C37.4058 9.59755 36.8309 9.17971 36.2024 8.85988C35.5633 8.5346 34.9084 8.32802 34.2049 8.20162C33.5112 8.07667 32.8039 8.03551 32.1025 8.01654C31.7805 8.00781 31.4587 8.00415 31.1368 8.00216C30.7547 8 30.3723 8 29.9903 8H21.5193H18.01C17.6276 8 17.2457 8 16.8637 8.00221C16.5416 8.0042 16.2195 8.00787 15.898 8.0166C15.7226 8.02134 15.5469 8.02748 15.3711 8.03594C14.8437 8.06137 14.3155 8.10798 13.7955 8.20167C13.2678 8.2965 12.7675 8.43638 12.2807 8.63762C12.1185 8.70465 11.9577 8.77857 11.7979 8.85988C11.3266 9.09975 10.8853 9.39475 10.4839 9.73753C10.3501 9.85181 10.2208 9.97137 10.0962 10.096C9.59758 10.5945 9.17969 11.1693 8.86001 11.7975C8.53436 12.4372 8.32799 13.092 8.20148 13.7961C8.07702 14.4895 8.03564 15.1967 8.01678 15.8976C8.00794 16.2198 8.00422 16.5415 8.00212 16.8633C7.9997 17.2455 8.00002 17.6278 8.00002 18.0099V23.2266V29.9899C8.00002 30.3724 7.99964 30.7543 8.00212 31.1368C8.00422 31.4586 8.00794 31.7803 8.01678 32.102C8.03564 32.8032 8.07696 33.5106 8.20148 34.2037C8.32799 34.9076 8.53436 35.563 8.86001 36.2025C9.17969 36.8308 9.59758 37.4055 10.0962 37.9038C10.5944 38.4025 11.1694 38.8203 11.798 39.1403C12.4372 39.4657 13.092 39.672 13.7956 39.7984C14.489 39.9232 15.1968 39.9647 15.898 39.9834C16.2196 39.992 16.5417 39.9958 16.8637 39.9976C17.2457 40.0004 17.6277 40 18.0101 40H29.9903C30.3723 40 30.7547 40.0004 31.1367 39.9976C31.4587 39.9958 31.7804 39.992 32.1024 39.9834C32.8039 39.9647 33.5111 39.9231 34.2049 39.7984C34.9084 39.672 35.5633 39.4656 36.2024 39.1403C36.8309 38.8204 37.4057 38.4025 37.9041 37.9038C38.4026 37.4055 38.8206 36.8308 39.1402 36.2025C39.4658 35.563 39.6725 34.9077 39.7989 34.2037C39.9234 33.5106 39.9649 32.8032 39.9836 32.102C39.9925 31.7803 39.996 31.4587 39.998 31.1368C40.0004 30.7543 40.0002 30.3724 40.0002 29.9899V18.0099C40.0003 17.6278 40.0004 17.2455 39.998 16.8634Z" fill="#F05138"/>
<path d="M33.3562 27.753C33.3555 27.752 33.3548 27.7513 33.354 27.7504C33.3894 27.6299 33.4259 27.5102 33.4569 27.3867C34.785 22.0952 31.5435 15.8391 26.0583 12.5452C28.462 15.8038 29.5249 19.7507 28.5806 23.2024C28.4963 23.5103 28.3951 23.8058 28.2832 24.093C28.1617 24.0132 28.0087 23.9226 27.8032 23.8093C27.8032 23.8093 22.3468 20.4403 16.433 14.4814C16.2778 14.325 19.5865 19.2105 23.3415 23.1776C21.5723 22.1848 16.6421 18.5976 13.5209 15.7409C13.9044 16.3804 14.3605 16.9962 14.8618 17.5891C17.4683 20.8946 20.8674 24.973 24.9398 28.1048C22.0785 29.8558 18.0355 29.992 14.01 28.1067C13.0144 27.6401 12.0784 27.0771 11.2119 26.4374C12.9159 29.1629 15.5402 31.5145 18.7343 32.8873C22.5434 34.5242 26.3312 34.4132 29.1524 32.9141L29.1502 32.9174C29.1631 32.9092 29.1794 32.9003 29.1928 32.8921C29.3086 32.8298 29.4236 32.7664 29.5361 32.6994C30.8915 31.9959 33.5689 31.282 35.0059 34.0781C35.3578 34.7624 36.1057 31.136 33.3562 27.753Z" fill="white"/>
</svg>

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

View file

@ -10,6 +10,7 @@ const metadata: Readonly<GuideMetadata> = Object.freeze({
repo: 'js',
path: 'packages/react-sample',
},
isFeatured: true,
});
export default metadata;

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 366 B

After

Width:  |  Height:  |  Size: 5.1 KiB

View file

@ -0,0 +1 @@
## Replace this with actual guide

View file

@ -0,0 +1,11 @@
import { ApplicationType } from '@logto/schemas';
import { type GuideMetadata } from '../types';
const metadata: Readonly<GuideMetadata> = Object.freeze({
name: 'Remix',
description: 'Integrate your Remix application with Logto.',
target: ApplicationType.SPA,
});
export default metadata;

View file

@ -0,0 +1,11 @@
<svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0_129_35385)">
<path fill-rule="evenodd" clip-rule="evenodd" d="M35.9908 32.1354C36.261 35.6016 36.261 37.2264 36.261 39H28.2352C28.2352 38.6138 28.2421 38.2602 28.249 37.902C28.2708 36.7878 28.2934 35.6262 28.1128 33.2802C27.8742 29.8456 26.394 29.0825 23.6725 29.0825H21.2614H11.0498V22.8335H24.0544C27.4921 22.8335 29.211 21.7886 29.211 19.0219C29.211 16.5891 27.4921 15.1148 24.0544 15.1148H11.0498V9H25.4868C33.2694 9 37.1368 12.673 37.1368 18.5404C37.1368 22.9289 34.4154 25.791 30.7389 26.268C33.8424 26.8883 35.6568 28.6532 35.9908 32.1354Z" fill="black"/>
<path d="M11.0498 39.0002V34.3418H19.5358C20.9533 34.3418 21.261 35.3924 21.261 36.0188V39.0002H11.0498Z" fill="black"/>
</g>
<defs>
<clipPath id="clip0_129_35385">
<rect width="30" height="30" fill="white" transform="translate(9 9)"/>
</clipPath>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 947 B

View file

@ -1,12 +1,12 @@
<?xml version="1.0" encoding="utf-8"?><!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo
Mixer Tools -->
<svg xmlns="http://www.w3.org/2000/svg"
aria-label="JavaScript" role="img"
viewBox="0 0 512 512">
<rect
width="512" height="512"
rx="15%"
fill="#f7df1e" />
<path
d="M324 370c10 17 24 29 47 29c20 0 33-10 33 -24c0-16 -13 -22 -35 -32l-12-5c-35-15 -58 -33 -58 -72c0-36 27 -64 70 -64c31 0 53 11 68 39l-37 24c-8-15 -17 -21 -31 -21c-14 0-23 9 -23 21c0 14 9 20 30 29l12 5c41 18 64 35 64 76c0 43-34 67 -80 67c-45 0-74 -21 -88 -49zm-170 4c8 13 14 25 31 25c16 0 26-6 26 -30V203h48v164c0 50-29 72 -72 72c-39 0-61 -20 -72 -44z" />
<svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0_129_41815)">
<path d="M8 8H40.0003V40H8V8Z" fill="#F7DF1E"/>
<path d="M16.4139 34.7415L18.8627 33.2595C19.3352 34.0971 19.7649 34.8059 20.7958 34.8059C21.7839 34.8059 22.4071 34.4194 22.4071 32.9159V22.6911H25.4142V32.9584C25.4142 36.073 23.5884 37.4908 20.9247 37.4908C18.5191 37.4908 17.1227 36.2449 16.4138 34.7413" fill="black"/>
<path d="M25.0001 34.9001L27.4486 33.4825C28.0932 34.5351 28.931 35.3084 30.413 35.3084C31.6591 35.3084 32.4536 34.6854 32.4536 33.8261C32.4536 32.7951 31.6374 32.4299 30.2626 31.8286L29.511 31.5061C27.3414 30.5827 25.9023 29.4228 25.9023 26.974C25.9023 24.7185 27.6206 23 30.3057 23C32.2175 23 33.5922 23.666 34.5802 25.4059L32.2387 26.9096C31.7231 25.986 31.1649 25.6209 30.3056 25.6209C29.4249 25.6209 28.8664 26.1794 28.8664 26.9096C28.8664 27.8117 29.4249 28.1771 30.7136 28.7356L31.4654 29.0578C34.0216 30.1534 35.4607 31.2703 35.4607 33.7833C35.4607 36.49 33.3342 37.972 30.4774 37.972C27.685 37.972 25.8806 36.6402 25 34.9002" fill="black"/>
</g>
<defs>
<clipPath id="clip0_129_41815">
<rect width="32.0003" height="32" fill="white" transform="translate(8 8)"/>
</clipPath>
</defs>
</svg>

Before

Width:  |  Height:  |  Size: 668 B

After

Width:  |  Height:  |  Size: 1.2 KiB

View file

@ -11,6 +11,7 @@ const metadata: Readonly<GuideMetadata> = Object.freeze({
repo: 'js',
path: 'packages/vue-sample',
},
isFeatured: true,
});
export default metadata;

View file

@ -1,2 +1,4 @@
<?xml version="1.0" encoding="utf-8"?><!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
<svg width="800px" height="800px" viewBox="0 -17.5 256 256" xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="xMinYMin meet"><path d="M204.8 0H256L128 220.8 0 0h97.92L128 51.2 157.44 0h47.36z" fill="#41B883"/><path d="M0 0l128 220.8L256 0h-51.2L128 132.48 50.56 0H0z" fill="#41B883"/><path d="M50.56 0L128 133.12 204.8 0h-47.36L128 51.2 97.92 0H50.56z" fill="#35495E"/></svg>
<svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M8.25 11.5L24 38.5L39.75 11.5H33.5625L24 27.8125L14.4375 11.5H8.25Z" fill="#41B883"/>
<path d="M14.4375 11.5L24 27.8125L33.5625 11.5H27.9375L24.0735 18.2642L20.0625 11.5H14.4375Z" fill="#35495E"/>
</svg>

Before

Width:  |  Height:  |  Size: 500 B

After

Width:  |  Height:  |  Size: 309 B

View file

@ -25,13 +25,15 @@ export type GuideMetadata = {
/** The path to the sample directory in the repository. */
path: string;
};
/** Whether the guide is displayed in featured group. */
isFeatured?: boolean;
};
/** The guide instance to build in the console. */
export type Guide = {
/** The unique identifier of the guide. */
id: string;
Logo?: LazyExoticComponent<FunctionComponent>;
Logo: LazyExoticComponent<SvgComponent>;
Component: LazyExoticComponent<FunctionComponent<MDXProps>>;
metadata: Readonly<GuideMetadata>;
};

View file

@ -0,0 +1 @@
## Replace this with actual guide

View file

@ -0,0 +1,12 @@
import { ApplicationType } from '@logto/schemas';
import { type GuideMetadata } from '../types';
const metadata: Readonly<GuideMetadata> = Object.freeze({
name: 'ChatGPT plugin',
description: 'Integrate ChatGPT Plugin OAuth with Logto.',
target: ApplicationType.Traditional,
isFeatured: true,
});
export default metadata;

View file

@ -0,0 +1,11 @@
<svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0_134_43590)">
<path d="M7.01416 15.1736C7.01416 10.6671 10.6671 7.01416 15.1736 7.01416H32.8251C37.333 7.01416 40.9859 10.6671 40.9859 15.1736V32.45C40.9859 37.1721 37.1579 41 32.4359 41H15.1736C10.6671 41 7.01416 37.3471 7.01416 32.8406V15.1736Z" fill="#74AA9C"/>
<path d="M22.6477 11.2269C19.8497 11.2269 17.364 13.0258 16.4978 15.6825C14.6989 16.0527 13.1458 17.1776 12.2358 18.7716C10.8325 21.1937 11.1533 24.239 13.0328 26.3149C12.452 28.0545 12.6512 29.9566 13.5782 31.5322C14.973 33.9628 17.7795 35.2092 20.5252 34.6298C21.7419 36.0005 23.49 36.782 25.3242 36.7749C28.1222 36.7749 30.6079 34.976 31.4756 32.3193C33.2773 31.9477 34.8275 30.8228 35.7291 29.2316C37.1408 26.8095 36.8201 23.7642 34.9406 21.6869V21.6784C35.5214 19.9388 35.3221 18.0354 34.3951 16.4526C33.0004 14.0305 30.1939 12.7841 27.4566 13.3635C26.2329 11.9956 24.482 11.2184 22.6477 11.2269ZM22.6477 12.8873L22.6393 12.8958C23.7655 12.8958 24.848 13.2844 25.7142 14.0037C25.6789 14.0206 25.6097 14.0644 25.5588 14.0899L20.4644 17.0236C20.2044 17.1705 20.049 17.4475 20.049 17.7499V24.6361L17.8572 23.3728V17.6807C17.8558 15.0367 19.9995 12.8915 22.6477 12.8873ZM28.7836 14.8925C30.5019 14.8897 32.0903 15.804 32.9481 17.292C33.502 18.2615 33.7098 19.3948 33.519 20.4928C33.4837 20.4674 33.4158 20.432 33.372 20.4066L28.2791 17.4644C28.0191 17.3175 27.6997 17.3175 27.4397 17.4644L21.4706 20.9083V18.3816L26.3982 15.5355C27.1231 15.1158 27.9456 14.894 28.7836 14.8925ZM16.1855 17.5068V23.5536C16.1855 23.8561 16.3409 24.1245 16.6009 24.28L22.5601 27.7139L20.3599 28.9857L15.4393 26.1482C13.1501 24.8226 12.3672 21.896 13.6899 19.6082C14.2509 18.6388 15.1327 17.8955 16.1855 17.5068ZM27.6022 19.0048L32.5312 21.8423C34.8275 23.1664 35.6062 26.0902 34.2807 28.3823L34.2891 28.3908C33.7267 29.3602 32.8421 30.1035 31.795 30.4851V24.4369C31.795 24.1344 31.6395 23.8575 31.3795 23.7105L25.4118 20.2667L27.6022 19.0048ZM23.9817 21.0891L26.4943 22.5418V25.4402L23.9817 26.8929L21.4692 25.4402V22.5418L23.9817 21.0891ZM27.9314 23.3728L30.1232 24.6361V30.3197C30.1232 32.9665 27.9753 35.1131 25.3327 35.1131V35.1046C24.2149 35.1046 23.124 34.7146 22.2662 33.9967C22.3015 33.9797 22.3792 33.9359 22.4216 33.9105L27.5146 30.9782C27.7746 30.8313 27.9385 30.5543 27.93 30.2519L27.9314 23.3728ZM26.5014 27.0935V29.6202L21.5723 32.4578C19.276 33.7734 16.3494 32.9948 15.0239 30.7098H15.0324C14.4699 29.7488 14.2693 28.607 14.46 27.509C14.4954 27.5344 14.5646 27.5698 14.607 27.5952L19.6999 30.5373C19.96 30.6843 20.2793 30.6843 20.5393 30.5373L26.5014 27.0935Z" fill="white"/>
</g>
<defs>
<clipPath id="clip0_134_43590">
<rect width="34" height="34" fill="white" transform="translate(7 7)"/>
</clipPath>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 2.7 KiB

View file

@ -0,0 +1 @@
## Replace this with actual guide

View file

@ -0,0 +1,12 @@
import { ApplicationType } from '@logto/schemas';
import { type GuideMetadata } from '../types';
const metadata: Readonly<GuideMetadata> = Object.freeze({
name: 'C#',
description:
'C# is a general-purpose, object-oriented programming language developed by Microsoft.',
target: ApplicationType.Traditional,
});
export default metadata;

View file

@ -0,0 +1,7 @@
<svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M39.8578 16.6581C39.8575 16.0587 39.7293 15.529 39.4701 15.0745C39.2154 14.6274 38.8341 14.2527 38.3225 13.9565C34.0999 11.5217 29.8731 9.0943 25.6518 6.65702C24.5138 6.00001 23.4104 6.02409 22.2808 6.69053C20.6001 7.68162 12.1852 12.5027 9.67765 13.9551C8.64498 14.553 8.14249 15.4679 8.14224 16.657C8.14062 21.5535 8.14224 26.45 8.14062 31.3465C8.14062 31.9328 8.26361 32.4523 8.51145 32.9C8.76623 33.3605 9.15294 33.7455 9.67629 34.0484C12.1839 35.5008 20.5999 40.3215 22.2803 41.313C23.4104 41.9798 24.5138 42.0036 25.6522 41.3465C29.8736 38.9091 34.1006 36.4817 38.3239 34.0469C38.8472 33.7441 39.2339 33.3589 39.4887 32.8987C39.7362 32.4509 39.8594 31.9316 39.8594 31.3452C39.8594 31.3452 39.8594 21.5547 39.8578 16.6581Z" fill="#A179DC"/>
<path d="M24.0483 23.954L8.51123 32.9C8.76602 33.3605 9.15272 33.7455 9.67607 34.0484C12.1837 35.5008 20.5997 40.3215 22.2801 41.313C23.4102 41.9798 24.5136 42.0036 25.652 41.3465C29.8734 38.9091 34.1004 36.4817 38.3236 34.0469C38.847 33.7441 39.2337 33.3589 39.4885 32.8987L24.0483 23.954Z" fill="#280068"/>
<path d="M39.8576 16.6581C39.8573 16.0587 39.7291 15.529 39.4699 15.0745L24.0483 23.9542L39.4885 32.8987C39.736 32.451 39.859 31.9316 39.8592 31.3452C39.8592 31.3452 39.8592 21.5547 39.8576 16.6581Z" fill="#390091"/>
<path d="M33.1961 20.6097V22.2819H34.8683V20.6097H35.7044V22.2819H37.3766V23.1179H35.7044V24.79H37.3766V25.6261H35.7044V27.2983H34.8683V25.6261H33.1961V27.2983H32.36V25.6261H30.688V24.79H32.36V23.1179H30.688V22.2819H32.36V20.6097H33.1961ZM34.8683 23.1178H33.1961V24.79H34.8683V23.1178Z" fill="white"/>
<path d="M24.0825 12.2119C28.444 12.2119 32.2519 14.5806 34.2915 18.1014L34.2717 18.0675L29.14 21.0222C28.129 19.3104 26.2757 18.1551 24.1494 18.1313L24.0824 18.1309C20.8402 18.1309 18.2116 20.7595 18.2116 24.0017C18.2106 25.0236 18.4775 26.0279 18.9859 26.9144C19.9979 28.681 21.9002 29.8726 24.0825 29.8726C26.2783 29.8726 28.1915 28.6659 29.1982 26.8804L29.1737 26.9232L34.2976 29.8915C32.2803 33.3826 28.5246 35.7439 24.2138 35.791L24.0825 35.7917C19.7072 35.7917 15.8885 33.4084 13.854 29.869C12.8608 28.1411 12.2925 26.1379 12.2925 24.0017C12.2925 17.4904 17.5709 12.2118 24.0824 12.2118L24.0825 12.2119Z" fill="white"/>
</svg>

After

Width:  |  Height:  |  Size: 2.3 KiB

View file

@ -1,4 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32">
<path
d="M32 24.795c-1.164.296-1.884.013-2.53-.957l-4.594-6.356-.664-.88-5.365 7.257c-.613.873-1.256 1.253-2.4.944l6.87-9.222-6.396-8.33c1.1-.214 1.86-.105 2.535.88l4.765 6.435 4.8-6.4c.615-.873 1.276-1.205 2.38-.883l-2.48 3.288-3.36 4.375c-.4.5-.345.842.023 1.325L32 24.795zM.008 15.427l.562-2.764C2.1 7.193 8.37 4.92 12.694 8.3c2.527 1.988 3.155 4.8 3.03 7.95H1.48c-.214 5.67 3.867 9.092 9.07 7.346 1.825-.613 2.9-2.042 3.438-3.83.273-.896.725-1.036 1.567-.78-.43 2.236-1.4 4.104-3.45 5.273-3.063 1.75-7.435 1.184-9.735-1.248C1 21.6.434 19.812.18 17.9c-.04-.316-.12-.617-.18-.92q.008-.776.008-1.552zm1.498-.38h12.872c-.084-4.1-2.637-7.012-6.126-7.037-3.83-.03-6.58 2.813-6.746 7.037z" />
<svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M40 32.7951C38.836 33.0911 38.116 32.8081 37.47 31.8381L32.876 25.4821L32.212 24.6021L26.847 31.8591C26.234 32.7321 25.591 33.1121 24.447 32.8031L31.317 23.5811L24.921 15.2511C26.021 15.0371 26.781 15.1461 27.456 16.1311L32.221 22.5661L37.021 16.1661C37.636 15.2931 38.297 14.9611 39.401 15.2831L36.921 18.5711L33.561 22.9461C33.161 23.4461 33.216 23.7881 33.584 24.2711L40 32.7951ZM8.008 23.4271L8.57 20.6631C10.1 15.1931 16.37 12.9201 20.694 16.3001C23.221 18.2881 23.849 21.1001 23.724 24.2501H9.48C9.266 29.9201 13.347 33.3421 18.55 31.5961C20.375 30.9831 21.45 29.5541 21.988 27.7661C22.261 26.8701 22.713 26.7301 23.555 26.9861C23.125 29.2221 22.155 31.0901 20.105 32.2591C17.042 34.0091 12.67 33.4431 10.37 31.0111C9 29.6001 8.434 27.8121 8.18 25.9001C8.14 25.5841 8.06 25.2831 8 24.9801C8.00533 24.4628 8.008 23.9455 8.008 23.4281V23.4271ZM9.506 23.0471H22.378C22.294 18.9471 19.741 16.0351 16.252 16.0101C12.422 15.9801 9.672 18.8231 9.506 23.0471Z" fill="black"/>
</svg>

Before

Width:  |  Height:  |  Size: 764 B

After

Width:  |  Height:  |  Size: 1.1 KiB

View file

@ -1 +1,6 @@
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" x="0" y="0" width="120" height="60" xml:space="preserve"><style>.st0{fill:#00acd7}</style><switch><g><path class="st0" d="M22.3 24.7c-.1 0-.2-.1-.1-.2l.7-1c.1-.1.2-.2.4-.2h12.6c.1 0 .2.1.1.2l-.6.9c-.1.1-.2.2-.4.2l-12.7.1zM17 27.9c-.1 0-.2-.1-.1-.2l.7-1c.1-.1.2-.2.4-.2h16.1c.1 0 .2.1.2.2l-.3 1c0 .1-.2.2-.3.2H17zm8.5 3.3c-.1 0-.2-.1-.1-.2l.5-.9c.1-.1.2-.2.4-.2h7c.1 0 .2.1.2.2l-.1.8c0 .1-.1.2-.2.2l-7.7.1zM62.1 24l-5.9 1.5c-.5.1-.6.2-1-.4-.5-.6-.9-1-1.7-1.3-2.2-1.1-4.4-.8-6.4.5-2.4 1.5-3.6 3.8-3.6 6.7 0 2.8 2 5.1 4.8 5.5 2.4.3 4.4-.5 6-2.3.3-.4.6-.8 1-1.3h-6.8c-.7 0-.9-.5-.7-1.1.5-1.1 1.3-2.9 1.8-3.8.1-.2.4-.6.9-.6h12.8c-.1 1-.1 1.9-.2 2.9-.4 2.5-1.3 4.9-2.9 6.9-2.5 3.3-5.8 5.4-10 6-3.5.5-6.7-.2-9.5-2.3-2.6-2-4.1-4.6-4.5-7.8-.5-3.8.7-7.3 3-10.3 2.5-3.3 5.8-5.4 9.9-6.1 3.3-.6 6.5-.2 9.3 1.7 1.9 1.2 3.2 2.9 4.1 5 .1.4 0 .5-.4.6z"/><path class="st0" d="M73.7 43.5c-3.2-.1-6.1-1-8.6-3.1-2.1-1.8-3.4-4.1-3.8-6.8-.6-4 .5-7.5 2.9-10.6 2.6-3.4 5.7-5.1 9.9-5.9 3.6-.6 7-.3 10 1.8 2.8 1.9 4.5 4.5 5 7.9.6 4.8-.8 8.6-4 11.9-2.3 2.4-5.2 3.8-8.4 4.5-1.1.2-2.1.2-3 .3zm8.4-14.2c0-.5 0-.8-.1-1.2-.6-3.5-3.8-5.5-7.2-4.7-3.3.7-5.4 2.8-6.2 6.1-.6 2.7.7 5.5 3.2 6.7 1.9.8 3.9.7 5.7-.2 2.9-1.4 4.4-3.7 4.6-6.7z"/></g></switch></svg>
<svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M26.647 21.5553C26.1758 21.687 25.6981 21.8207 25.1451 21.971C24.875 22.0475 24.8135 22.0648 24.5621 21.7593C24.2606 21.3993 24.0395 21.1663 23.6172 20.9545C22.3507 20.298 21.1243 20.4887 19.9785 21.2722C18.6115 22.204 17.9078 23.5806 17.928 25.2959C17.948 26.9901 19.0537 28.3878 20.642 28.6208C22.009 28.8114 23.1548 28.303 24.0595 27.223C24.2403 26.9902 24.4013 26.7358 24.6023 26.4396H20.7223C20.3001 26.4396 20.1996 26.1642 20.3403 25.8042C20.6017 25.1477 21.0842 24.0464 21.3656 23.4958C21.426 23.3688 21.5667 23.1569 21.8682 23.1569H28.3376C28.6282 22.1869 29.0997 21.2704 29.7287 20.4032C31.1963 18.3702 32.9655 17.3113 35.3577 16.8665C37.4083 16.4854 39.3382 16.6972 41.0872 17.9465C42.6755 19.0902 43.6605 20.6362 43.9218 22.6692C44.2636 25.5282 43.4796 27.8577 41.61 29.8483C40.2831 31.2673 38.6547 32.1567 36.7851 32.559C36.4285 32.6287 36.0718 32.6617 35.7208 32.6942C35.5377 32.7111 35.3561 32.7279 35.1768 32.7497C33.3473 32.7073 31.6788 32.1567 30.2715 30.886C29.2818 29.9849 28.6002 28.8774 28.2613 27.5881C28.0262 28.0883 27.7451 28.5674 27.4168 29.0232C25.9693 31.0351 24.0796 32.2844 21.6873 32.6233C19.7171 32.8987 17.8877 32.4963 16.2794 31.2256C14.7917 30.0397 13.9474 28.4725 13.7263 26.5242C13.4649 24.2158 14.1082 22.1404 15.4351 20.3192C16.8625 18.3497 18.7522 17.1002 21.0641 16.6555C22.9538 16.2955 24.7631 16.5284 26.3916 17.6932C27.457 18.4344 28.221 19.4509 28.7236 20.6792C28.8442 20.8698 28.7637 20.9757 28.5225 21.0392C27.818 21.2277 27.2377 21.39 26.647 21.5553ZM39.9475 23.9674C39.9515 24.0385 39.9556 24.1135 39.9615 24.1939C39.861 26.0152 38.9965 27.3705 37.4083 28.2389C36.3428 28.8107 35.2371 28.8742 34.1315 28.3659C32.684 27.6883 31.92 26.0152 32.2818 24.3634C32.7242 22.3727 33.9303 21.1232 35.8 20.6785C37.7098 20.2125 39.5393 21.3985 39.9012 23.495C39.9296 23.645 39.938 23.7949 39.9475 23.9674Z" fill="#00ACD7"/>
<path d="M7.05551 21.3151C7.0153 21.3786 7.0354 21.421 7.11581 21.421L13.103 21.4421C13.1633 21.4421 13.2638 21.3786 13.304 21.3151L13.6458 20.7645C13.686 20.7009 13.6659 20.6374 13.5855 20.6374H7.69882C7.61841 20.6374 7.51788 20.6798 7.47768 20.7433L7.05551 21.3151Z" fill="#00ACD7"/>
<path d="M4.0201 23.2627C3.9799 23.3263 4 23.3687 4.08041 23.3687L12.2991 23.3475C12.3795 23.3475 12.4599 23.3051 12.48 23.2205L12.6409 22.7122C12.661 22.6486 12.6208 22.5851 12.5403 22.5851H4.66342C4.58301 22.5851 4.48249 22.6275 4.44228 22.691L4.0201 23.2627Z" fill="#00ACD7"/>
<path d="M8.88534 25.1904C8.84513 25.254 8.86523 25.3175 8.94565 25.3175L12.0379 25.3386C12.0982 25.3386 12.1786 25.2751 12.1786 25.1904L12.2188 24.6821C12.2188 24.5975 12.1786 24.5339 12.0982 24.5339H9.36783C9.2874 24.5339 9.20699 24.5975 9.16679 24.661L8.88534 25.1904Z" fill="#00ACD7"/>
</svg>

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

View file

@ -0,0 +1 @@
## Replace this with actual guide

View file

@ -0,0 +1,12 @@
import { ApplicationType } from '@logto/schemas';
import { type GuideMetadata } from '../types';
const metadata: Readonly<GuideMetadata> = Object.freeze({
name: 'Java Web',
description:
'Java Web is a web framework for Java that enables developers to build secure, fast, and scalable server applications with the Java programming language.',
target: ApplicationType.Traditional,
});
export default metadata;

View file

@ -0,0 +1,11 @@
<svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0_129_35349)">
<path d="M19.3484 33.2862C19.3484 33.2862 18.0415 34.081 20.2568 34.3084C22.9237 34.6484 24.3443 34.5921 27.2959 34.0247C27.8891 34.388 28.5165 34.6922 29.1691 34.9331C22.5285 37.7721 14.1252 34.7631 19.3484 33.2862ZM18.4984 29.5962C18.4984 29.5962 17.0789 30.6746 19.2932 30.9031C22.1885 31.1867 24.459 31.2431 28.3775 30.4494C28.7586 30.8359 29.2252 31.1274 29.7397 31.3004C21.7348 33.6847 12.7652 31.5267 18.4984 29.5962ZM34.1671 36.0668C34.1671 36.0668 35.1319 36.8616 33.0887 37.4863C29.2849 38.6232 17.1363 38.9632 13.7299 37.4863C12.5378 36.9763 14.8083 36.2379 15.5362 36.1242C16.2746 35.9542 16.673 35.9542 16.673 35.9542C15.3662 35.0457 7.9871 37.8274 12.9267 38.6211C26.4948 40.8353 37.6787 37.6563 34.1586 36.0668H34.1671ZM19.9625 25.7351C19.9625 25.7351 13.7745 27.2119 17.7483 27.7219C19.4515 27.9493 22.8005 27.8919 25.9232 27.6656C28.4774 27.4382 31.0338 26.9856 31.0338 26.9856C31.0338 26.9856 30.1253 27.383 29.5006 27.7804C23.2 29.4272 11.1066 28.6888 14.5703 26.9856C17.522 25.5661 19.9636 25.7372 19.9636 25.7372L19.9625 25.7351ZM31.0338 31.9231C37.3918 28.6293 34.4402 25.4524 32.3959 25.8487C31.8859 25.9624 31.6575 26.0761 31.6575 26.0761C31.6575 26.0761 31.8275 25.7361 32.2248 25.6224C36.256 24.2029 39.435 29.8799 30.918 32.0931C30.918 32.0931 30.9743 32.0367 31.0317 31.9231H31.0338ZM20.5894 40.8927C26.72 41.2901 36.0881 40.6653 36.3144 37.7689C36.3144 37.7689 35.8607 38.9058 31.2622 39.7558C26.039 40.7206 19.5673 40.6058 15.7635 39.9832C15.7635 39.9832 16.5583 40.6642 20.5894 40.8927Z" fill="#4E7896"/>
<path d="M27.1834 7.00104C27.1834 7.00104 30.7034 10.5774 23.8344 15.9707C18.3274 20.3418 22.5859 22.8397 23.8344 25.6787C20.598 22.7834 18.2711 20.2281 19.8606 17.8449C22.1875 14.3238 28.6029 12.6312 27.1834 7.00104ZM25.3771 23.2945C27.024 25.1677 24.9234 26.8708 24.9234 26.8708C24.9234 26.8708 29.1245 24.714 27.194 22.045C25.4345 19.4907 24.0702 18.2412 31.4514 13.9838C31.4514 13.9838 19.8139 16.8791 25.3771 23.2945Z" fill="#F58219"/>
</g>
<defs>
<clipPath id="clip0_129_35349">
<rect width="34" height="34" fill="white" transform="translate(7 7)"/>
</clipPath>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 2.2 KiB

View file

@ -0,0 +1 @@
## Replace this with actual guide

View file

@ -0,0 +1,16 @@
import { ApplicationType } from '@logto/schemas';
import { type GuideMetadata } from '../types';
const metadata: Readonly<GuideMetadata> = Object.freeze({
name: 'Next.js (App Router)',
description:
'Next.js (App Router) is a React framework for production - it makes building fullstack React apps and sites a breeze and ships with built-in SSR.',
target: ApplicationType.Traditional,
sample: {
repo: 'js',
path: 'packages/next-sample',
},
});
export default metadata;

View file

@ -0,0 +1,10 @@
<svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0_134_42589)">
<path d="M31.7494 38.005C31.6304 38.068 31.6404 38.088 31.7544 38.03C31.7914 38.015 31.8224 37.994 31.8494 37.969C31.8494 37.948 31.8494 37.948 31.7494 38.005ZM31.9894 37.875C31.9324 37.922 31.9324 37.922 32.0004 37.891C32.0364 37.87 32.0684 37.85 32.0684 37.844C32.0684 37.817 32.0524 37.823 31.9894 37.875ZM32.1454 37.781C32.0884 37.828 32.0884 37.828 32.1564 37.797C32.1934 37.776 32.2244 37.754 32.2244 37.749C32.2244 37.724 32.2084 37.729 32.1454 37.781ZM32.3034 37.688C32.2464 37.735 32.2464 37.735 32.3124 37.703C32.3494 37.683 32.3804 37.662 32.3804 37.656C32.3804 37.631 32.3644 37.636 32.3034 37.688ZM32.5164 37.547C32.4074 37.62 32.3694 37.667 32.4694 37.615C32.5364 37.574 32.6504 37.484 32.6304 37.484C32.5874 37.5 32.5514 37.527 32.5154 37.547H32.5164ZM22.9534 8.01101C22.8804 8.01601 22.6614 8.03601 22.4694 8.05201C17.9213 8.46401 13.6663 10.912 10.9693 14.683C9.47826 16.75 8.51025 19.151 8.14525 21.672C8.01624 22.552 8.00024 22.812 8.00024 24.005C8.00024 25.197 8.01624 25.453 8.14525 26.333C9.01625 32.344 13.2923 37.39 19.0883 39.26C20.1313 39.593 21.2243 39.823 22.4694 39.964C22.9534 40.016 25.0464 40.016 25.5304 39.964C27.6824 39.724 29.4994 39.193 31.2974 38.276C31.5734 38.136 31.6254 38.099 31.5884 38.068C30.7084 36.907 29.8444 35.745 28.9794 34.573L26.4224 31.12L23.2194 26.375C22.1514 24.787 21.0793 23.203 19.9903 21.631C19.9793 21.631 19.9653 23.74 19.9593 26.312C19.9483 30.817 19.9483 31 19.8913 31.104C19.8343 31.229 19.7403 31.333 19.6153 31.391C19.5163 31.438 19.4273 31.448 18.9543 31.448H18.4133L18.2723 31.36C18.1843 31.303 18.1113 31.224 18.0643 31.131L17.9963 30.99L18.0013 24.719L18.0123 18.448L18.1113 18.323C18.1743 18.246 18.2523 18.183 18.3403 18.136C18.4713 18.073 18.5233 18.063 19.0643 18.063C19.6993 18.063 19.8043 18.088 19.9713 18.271C21.2673 20.203 22.5594 22.14 23.8304 24.083C25.9094 27.235 28.7474 31.536 30.1424 33.646L32.6794 37.485L32.8044 37.402C34.0234 36.589 35.1325 35.621 36.0895 34.517C38.1055 32.209 39.4135 29.37 39.8565 26.34C39.9855 25.46 40.0015 25.199 40.0015 24.007C40.0015 22.814 39.9855 22.559 39.8565 21.679C38.9855 15.668 34.7095 10.622 28.9134 8.75101C27.8294 8.40801 26.7144 8.17401 25.5854 8.05401C25.2824 8.02301 23.2144 7.98601 22.9544 8.01301L22.9534 8.01101ZM29.5004 17.688C29.6514 17.76 29.7654 17.896 29.8174 18.052C29.8444 18.136 29.8494 19.875 29.8444 23.792L29.8334 29.416L28.8444 27.896L27.8494 26.375V22.292C27.8494 19.645 27.8604 18.161 27.8744 18.088C27.9214 17.921 28.0354 17.781 28.1874 17.693C28.3114 17.63 28.3594 17.625 28.8544 17.625C29.3174 17.625 29.3954 17.63 29.4994 17.688H29.5004Z" fill="black"/>
</g>
<defs>
<clipPath id="clip0_134_42589">
<rect width="32.0003" height="32" fill="white" transform="translate(8.00024 8)"/>
</clipPath>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 2.8 KiB

View file

@ -11,6 +11,7 @@ const metadata: Readonly<GuideMetadata> = Object.freeze({
repo: 'js',
path: 'packages/next-sample',
},
isFeatured: true,
});
export default metadata;

View file

@ -1,11 +1,10 @@
<svg viewBox="0 0 256 256" version="1.1"
xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
preserveAspectRatio="xMidYMid">
<g>
<path
d="M119.616813,0.0688905149 C119.066276,0.118932037 117.314565,0.294077364 115.738025,0.419181169 C79.3775171,3.69690087 45.3192571,23.3131775 23.7481916,53.4631946 C11.7364614,70.2271045 4.05395894,89.2428829 1.15112414,109.384595 C0.12512219,116.415429 0,118.492153 0,128.025062 C0,137.557972 0.12512219,139.634696 1.15112414,146.665529 C8.10791789,194.730411 42.3163245,235.11392 88.7116325,250.076335 C97.0197458,252.753556 105.778299,254.580072 115.738025,255.680985 C119.616813,256.106338 136.383187,256.106338 140.261975,255.680985 C157.453763,253.779407 172.017986,249.525878 186.382014,242.194795 C188.584164,241.068861 189.00958,240.768612 188.709286,240.518404 C188.509091,240.36828 179.124927,227.782837 167.86393,212.570214 L147.393939,184.922273 L121.743891,146.965779 C107.630108,126.098464 96.0187683,109.034305 95.9186706,109.034305 C95.8185728,109.009284 95.7184751,125.873277 95.6684262,146.465363 C95.5933529,182.52028 95.5683284,183.971484 95.1178886,184.82219 C94.4672532,186.048207 93.9667644,186.548623 92.915738,187.099079 C92.114956,187.499411 91.4142717,187.574474 87.6355816,187.574474 L83.3063539,187.574474 L82.1552297,186.848872 C81.4044966,186.373477 80.8539589,185.747958 80.4785924,185.022356 L79.9530792,183.896422 L80.0031281,133.729796 L80.0782014,83.5381493 L80.8539589,82.5623397 C81.25435,82.0369037 82.1051808,81.3613431 82.7057674,81.0360732 C83.7317693,80.535658 84.1321603,80.4856165 88.4613881,80.4856165 C93.5663734,80.4856165 94.4172043,80.6857826 95.7434995,82.1369867 C96.1188661,82.5373189 110.007429,103.454675 126.623656,128.650581 C143.239883,153.846488 165.962072,188.250034 177.122972,205.139048 L197.392766,235.839522 L198.418768,235.163961 C207.502639,229.259062 217.112023,220.852086 224.719453,212.09482 C240.910264,193.504394 251.345455,170.835585 254.848876,146.665529 C255.874878,139.634696 256,137.557972 256,128.025062 C256,118.492153 255.874878,116.415429 254.848876,109.384595 C247.892082,61.3197135 213.683675,20.9362052 167.288368,5.97379012 C159.105376,3.32158945 150.396872,1.49507389 140.637341,0.394160408 C138.234995,0.143952798 121.693842,-0.131275573 119.616813,0.0688905149 L119.616813,0.0688905149 Z M172.017986,77.4831252 C173.219159,78.0836234 174.195112,79.2345784 174.545455,80.435575 C174.74565,81.0861148 174.795699,94.9976579 174.74565,126.348671 L174.670577,171.336 L166.73783,159.17591 L158.780059,147.01582 L158.780059,114.313685 C158.780059,93.1711423 158.880156,81.2862808 159.030303,80.7108033 C159.430694,79.3096407 160.306549,78.2087272 161.507722,77.5581875 C162.533724,77.0327515 162.909091,76.98271 166.837928,76.98271 C170.541544,76.98271 171.19218,77.0327515 172.017986,77.4831252 Z"
fill="#000000">
</path>
</g>
<svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0_134_42589)">
<path d="M31.7494 38.005C31.6304 38.068 31.6404 38.088 31.7544 38.03C31.7914 38.015 31.8224 37.994 31.8494 37.969C31.8494 37.948 31.8494 37.948 31.7494 38.005ZM31.9894 37.875C31.9324 37.922 31.9324 37.922 32.0004 37.891C32.0364 37.87 32.0684 37.85 32.0684 37.844C32.0684 37.817 32.0524 37.823 31.9894 37.875ZM32.1454 37.781C32.0884 37.828 32.0884 37.828 32.1564 37.797C32.1934 37.776 32.2244 37.754 32.2244 37.749C32.2244 37.724 32.2084 37.729 32.1454 37.781ZM32.3034 37.688C32.2464 37.735 32.2464 37.735 32.3124 37.703C32.3494 37.683 32.3804 37.662 32.3804 37.656C32.3804 37.631 32.3644 37.636 32.3034 37.688ZM32.5164 37.547C32.4074 37.62 32.3694 37.667 32.4694 37.615C32.5364 37.574 32.6504 37.484 32.6304 37.484C32.5874 37.5 32.5514 37.527 32.5154 37.547H32.5164ZM22.9534 8.01101C22.8804 8.01601 22.6614 8.03601 22.4694 8.05201C17.9213 8.46401 13.6663 10.912 10.9693 14.683C9.47826 16.75 8.51025 19.151 8.14525 21.672C8.01624 22.552 8.00024 22.812 8.00024 24.005C8.00024 25.197 8.01624 25.453 8.14525 26.333C9.01625 32.344 13.2923 37.39 19.0883 39.26C20.1313 39.593 21.2243 39.823 22.4694 39.964C22.9534 40.016 25.0464 40.016 25.5304 39.964C27.6824 39.724 29.4994 39.193 31.2974 38.276C31.5734 38.136 31.6254 38.099 31.5884 38.068C30.7084 36.907 29.8444 35.745 28.9794 34.573L26.4224 31.12L23.2194 26.375C22.1514 24.787 21.0793 23.203 19.9903 21.631C19.9793 21.631 19.9653 23.74 19.9593 26.312C19.9483 30.817 19.9483 31 19.8913 31.104C19.8343 31.229 19.7403 31.333 19.6153 31.391C19.5163 31.438 19.4273 31.448 18.9543 31.448H18.4133L18.2723 31.36C18.1843 31.303 18.1113 31.224 18.0643 31.131L17.9963 30.99L18.0013 24.719L18.0123 18.448L18.1113 18.323C18.1743 18.246 18.2523 18.183 18.3403 18.136C18.4713 18.073 18.5233 18.063 19.0643 18.063C19.6993 18.063 19.8043 18.088 19.9713 18.271C21.2673 20.203 22.5594 22.14 23.8304 24.083C25.9094 27.235 28.7474 31.536 30.1424 33.646L32.6794 37.485L32.8044 37.402C34.0234 36.589 35.1325 35.621 36.0895 34.517C38.1055 32.209 39.4135 29.37 39.8565 26.34C39.9855 25.46 40.0015 25.199 40.0015 24.007C40.0015 22.814 39.9855 22.559 39.8565 21.679C38.9855 15.668 34.7095 10.622 28.9134 8.75101C27.8294 8.40801 26.7144 8.17401 25.5854 8.05401C25.2824 8.02301 23.2144 7.98601 22.9544 8.01301L22.9534 8.01101ZM29.5004 17.688C29.6514 17.76 29.7654 17.896 29.8174 18.052C29.8444 18.136 29.8494 19.875 29.8444 23.792L29.8334 29.416L28.8444 27.896L27.8494 26.375V22.292C27.8494 19.645 27.8604 18.161 27.8744 18.088C27.9214 17.921 28.0354 17.781 28.1874 17.693C28.3114 17.63 28.3594 17.625 28.8544 17.625C29.3174 17.625 29.3954 17.63 29.4994 17.688H29.5004Z" fill="black"/>
</g>
<defs>
<clipPath id="clip0_134_42589">
<rect width="32.0003" height="32" fill="white" transform="translate(8.00024 8)"/>
</clipPath>
</defs>
</svg>

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

View file

@ -0,0 +1 @@
## Replace this with actual guide

View file

@ -0,0 +1,11 @@
import { ApplicationType } from '@logto/schemas';
import { type GuideMetadata } from '../types';
const metadata: Readonly<GuideMetadata> = Object.freeze({
name: 'PHP',
description: 'PHP is the best language in the world.',
target: ApplicationType.Traditional,
});
export default metadata;

View file

@ -0,0 +1,5 @@
<svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M11.8767 26.0912C12.9499 26.0912 13.7512 25.8902 14.2581 25.4938C14.7597 25.1016 15.1061 24.422 15.2876 23.4741C15.4569 22.588 15.3924 21.9694 15.096 21.6355C14.7929 21.2945 14.1377 21.1215 13.1485 21.1215H11.4333L10.4825 26.0912H11.8767ZM6.2668 32.2129C6.18718 32.2129 6.11157 32.1768 6.06095 32.1143C6.01024 32.0518 5.9897 31.9696 6.00491 31.8902L8.52487 18.7205C8.54925 18.5931 8.65911 18.5012 8.78685 18.5012H14.218C15.9249 18.5012 17.1954 18.9719 17.994 19.9005C18.7968 20.834 19.0447 22.1389 18.7308 23.7788C18.6031 24.4469 18.3833 25.0674 18.0778 25.6229C17.7718 26.179 17.3675 26.6936 16.8759 27.1526C16.2873 27.7121 15.6212 28.1178 14.8978 28.3566C14.1859 28.5921 13.2716 28.7116 12.1804 28.7116H9.98119L9.35315 31.9935C9.32878 32.121 9.219 32.2129 9.09126 32.2129H6.2668Z" fill="#6082BB"/>
<path d="M25.4279 28.7118C25.3492 28.7118 25.2746 28.6756 25.2247 28.6131C25.1745 28.5507 25.1543 28.4685 25.1693 28.389L26.2697 22.5619C26.3744 22.0078 26.3486 21.61 26.1971 21.442C26.1043 21.3392 25.8258 21.1669 25.0022 21.1669H23.0085L21.625 28.4924C21.6009 28.6198 21.4925 28.7118 21.3664 28.7118H18.6001C18.5215 28.7118 18.4469 28.6756 18.3968 28.6131C18.3468 28.5507 18.3265 28.4684 18.3415 28.389L20.8292 15.2193C20.8532 15.092 20.9617 15 21.0878 15H23.854C23.9327 15 24.0073 15.0361 24.0573 15.0986C24.1074 15.1611 24.1277 15.2432 24.1127 15.3228L23.5123 18.5014H25.657C27.2908 18.5014 28.3987 18.7977 29.044 19.4075C29.7018 20.0295 29.907 21.0241 29.6541 22.3639L28.4966 28.4924C28.4726 28.6198 28.3642 28.7118 28.238 28.7118H25.4279Z" fill="#6082BB"/>
<path d="M34.7462 26.0912C35.8606 26.0912 36.6926 25.8902 37.219 25.4938C37.7398 25.1017 38.0995 24.4221 38.2881 23.4741C38.4639 22.588 38.3969 21.9694 38.0891 21.6355C37.7744 21.2945 37.094 21.1215 36.0668 21.1215H34.2858L33.2985 26.0912H34.7462ZM28.9212 32.2129C28.8385 32.2129 28.76 32.1768 28.7074 32.1143C28.6548 32.0518 28.6333 31.9696 28.6491 31.8902L31.2658 18.7205C31.2912 18.5931 31.4052 18.5012 31.5379 18.5012H37.1774C38.9499 18.5012 40.269 18.9719 41.0983 19.9005C41.9319 20.8339 42.1893 22.1388 41.8634 23.7788C41.7306 24.4469 41.5025 25.0674 41.1852 25.6229C40.8675 26.179 40.4477 26.6936 39.9372 27.1526C39.3261 27.7121 38.6344 28.1178 37.8833 28.3566C37.144 28.5921 36.1946 28.7116 35.0615 28.7116H32.7779L32.126 31.9935C32.1006 32.121 31.9866 32.2129 31.8539 32.2129H28.9212Z" fill="#6082BB"/>
</svg>

After

Width:  |  Height:  |  Size: 2.4 KiB

View file

@ -0,0 +1 @@
## Replace this with actual guide

View file

@ -0,0 +1,12 @@
import { ApplicationType } from '@logto/schemas';
import { type GuideMetadata } from '../types';
const metadata: Readonly<GuideMetadata> = Object.freeze({
name: 'Python',
description:
'Python is a programming language that lets you work quickly and integrate systems more effectively.',
target: ApplicationType.Traditional,
});
export default metadata;

View file

@ -0,0 +1,14 @@
<svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M23.885 8C15.761 8 16.268 11.523 16.268 11.523L16.278 15.173H24.03V16.268H13.197C13.197 16.268 8 15.678 8 23.876C8 32.072 12.537 31.782 12.537 31.782H15.245V27.978C15.245 27.978 15.099 23.441 19.71 23.441H27.398C27.398 23.441 31.718 23.511 31.718 19.266V12.247C31.718 12.247 32.374 8 23.885 8ZM19.61 10.454C20.381 10.454 21.005 11.078 21.005 11.849C21.005 12.62 20.381 13.244 19.61 13.244C19.4267 13.2443 19.2452 13.2084 19.0758 13.1383C18.9065 13.0683 18.7526 12.9656 18.623 12.836C18.4934 12.7064 18.3907 12.5525 18.3207 12.3832C18.2506 12.2138 18.2147 12.0323 18.215 11.849C18.215 11.078 18.839 10.454 19.61 10.454Z" fill="url(#paint0_linear_129_42168)"/>
<path d="M24.115 39.833C32.239 39.833 31.732 36.31 31.732 36.31L31.722 32.66H23.97V31.565H34.802C34.802 31.565 40 32.155 40 23.958C40 15.761 35.463 16.052 35.463 16.052H32.755V19.855C32.755 19.855 32.901 24.392 28.29 24.392H20.602C20.602 24.392 16.282 24.322 16.282 28.567V35.586C16.282 35.586 15.626 39.833 24.115 39.833ZM28.39 37.379C28.2068 37.3793 28.0252 37.3434 27.8559 37.2734C27.6865 37.2033 27.5326 37.1006 27.403 36.971C27.2734 36.8414 27.1707 36.6875 27.1007 36.5182C27.0307 36.3488 26.9948 36.1673 26.995 35.984C26.995 35.214 27.619 34.59 28.39 34.59C29.161 34.59 29.785 35.213 29.785 35.984C29.785 36.756 29.161 37.379 28.39 37.379Z" fill="url(#paint1_linear_129_42168)"/>
<defs>
<linearGradient id="paint0_linear_129_42168" x1="11.075" y1="10.782" x2="26.898" y2="26.658" gradientUnits="userSpaceOnUse">
<stop stop-color="#387EB8"/>
<stop offset="1" stop-color="#366994"/>
</linearGradient>
<linearGradient id="paint1_linear_129_42168" x1="20.809" y1="20.882" x2="37.803" y2="37.163" gradientUnits="userSpaceOnUse">
<stop stop-color="#FFE052"/>
<stop offset="1" stop-color="#FFC331"/>
</linearGradient>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 1.9 KiB

View file

@ -0,0 +1,87 @@
import { useCallback } from 'react';
import guides from '@/assets/docs/guides';
import { type Guide } from '@/assets/docs/guides/types';
import { type AppGuideCategory, type StructuredAppGuideMetadata } from '@/types/applications';
const defaultStructuredMetadata: StructuredAppGuideMetadata = {
featured: [],
Traditional: [],
SPA: [],
Native: [],
MachineToMachine: [],
};
type FilterOptions = {
categories?: AppGuideCategory[];
keyword?: string;
};
const useAppGuideMetadata = (): [
(filters?: FilterOptions) => readonly Guide[] | undefined,
(filters?: FilterOptions) => Record<AppGuideCategory, readonly Guide[]>,
] => {
const getFilteredMetadata = useCallback((filters?: FilterOptions) => {
const { categories: filterCategories, keyword } = filters ?? {};
// If no filter is applied, return all metadata
if (!filterCategories?.length && !keyword) {
return guides;
}
// Keyword only, return partial name matched result
if (keyword && !filterCategories?.length) {
return guides.filter(({ metadata: { name } }) =>
name.toLowerCase().includes(keyword.toLowerCase())
);
}
// Categories only, return selected categories
if (!keyword && filterCategories?.length) {
return guides.filter(({ metadata: { target, isFeatured } }) =>
filterCategories.some(
(filterCategory) =>
filterCategory === target || (isFeatured && filterCategory === 'featured')
)
);
}
// Keyword and categories, return partial name matched result in selected categories
if (keyword && filterCategories?.length) {
return guides.filter(
({ metadata: { name, target, isFeatured } }) =>
name.toLowerCase().includes(keyword.toLowerCase()) &&
filterCategories.some(
(filterCategory) =>
filterCategory === target || (isFeatured && filterCategory === 'featured')
)
);
}
}, []);
const getStructuredMetadata = useCallback(
(filters?: FilterOptions) => {
const filteredMetadata = getFilteredMetadata(filters) ?? [];
return filteredMetadata.reduce((accumulated, guide) => {
const { target, isFeatured } = guide.metadata;
// Rule out API target guides to make TypeScript happy
if (target === 'API') {
return accumulated;
}
return {
...accumulated,
[target]: [...accumulated[target], guide],
...(isFeatured && {
featured: [...accumulated.featured, guide],
}),
};
}, defaultStructuredMetadata);
},
[getFilteredMetadata]
);
return [getFilteredMetadata, getStructuredMetadata];
};
// eslint-disable-next-line import/no-unused-modules
export default useAppGuideMetadata;

View file

@ -1,5 +1,8 @@
import { ApplicationType } from '@logto/schemas';
import { type Guide } from '@/assets/docs/guides/types';
/** @deprecated */
export const applicationTypeI18nKey = Object.freeze({
[ApplicationType.Native]: 'applications.type.native',
[ApplicationType.SPA]: 'applications.type.spa',
@ -7,6 +10,7 @@ export const applicationTypeI18nKey = Object.freeze({
[ApplicationType.MachineToMachine]: 'applications.type.machine_to_machine',
} as const);
/** @deprecated */
export enum SupportedSdk {
iOS = 'iOS',
Android = 'Android',
@ -18,9 +22,32 @@ export enum SupportedSdk {
Go = 'Go',
}
/** @deprecated */
export const applicationTypeAndSdkTypeMappings = Object.freeze({
[ApplicationType.Native]: [SupportedSdk.iOS, SupportedSdk.Android],
[ApplicationType.SPA]: [SupportedSdk.React, SupportedSdk.Vue, SupportedSdk.Vanilla],
[ApplicationType.Traditional]: [SupportedSdk.Next, SupportedSdk.Express, SupportedSdk.Go],
[ApplicationType.MachineToMachine]: [],
} as const);
/**
* All application guide categories, including all 4 existing application types,
* plus the "featured" category.
*/
/* eslint-disable import/no-unused-modules */
export const allAppGuideCategories = Object.freeze([
'featured',
'Traditional',
'SPA',
'Native',
'MachineToMachine',
] as const);
export type AppGuideCategory = (typeof allAppGuideCategories)[number];
/**
* Structured application guide metadata, grouped by the above application category.
* E.g. `{'featured': [...], 'Traditional': [...], 'SPA': [...], 'Native': [...]}`
*/
export type StructuredAppGuideMetadata = Record<AppGuideCategory, readonly Guide[]>;
/* eslint-enable import/no-unused-modules */