Skip to content

Commit cadc53f

Browse files
committed
🎉 feat: add oiia
1 parent 51b28b2 commit cadc53f

30 files changed

+2934
-16
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Deploy to Cloudflare Pages
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
deploy:
10+
runs-on: ubuntu-latest
11+
name: Deploy
12+
steps:
13+
- uses: actions/checkout@v4
14+
- name: Deploy
15+
uses: cloudflare/wrangler-action@v3
16+
with:
17+
environment: production
18+
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
19+
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
20+
command: pages deploy docs/.vitepress/dist --project-name=elysia-doc
21+
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
22+
env:
23+
NODE_OPTIONS: --max-old-space-size=8192
24+
NODE_VERSION: 22.14.0
25+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

docs/.vitepress/config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ export default defineConfig({
124124
detailedView: true
125125
}
126126
},
127-
logo: '/assets/elysia.svg',
127+
logo: '/oiia/oiia-static.webp',
128128
nav: [
129129
{
130130
text: 'Cheat Sheet',

docs/components/fern/beyond.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@
140140
<p>
141141
Like tRPC, Elysia provides type-safety from the backend to
142142
the frontend without code generation. The interaction between
143-
frontend and backend is type-checked at compile time.
143+
frontend and backend is both type-checked on compile and runtime.
144144
</p>
145145
</header>
146146
</article>

docs/components/oiia/benchmark.vue

Lines changed: 145 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,145 @@
1+
<template>
2+
<article id="benchmark">
3+
<div class="grid">
4+
<div class="fog" />
5+
</div>
6+
<header class="flex flex-row md:flex-col justify-around md:justify-center z-10 w-full md:max-w-[10.5rem]">
7+
<div class="title md:mb-10">
8+
<h3 class="text-gradient from-pink-400 to-fuchsia-400">21x</h3>
9+
<p>oiia than Express</p>
10+
</div>
11+
12+
<div class="title">
13+
<h3 class="md:!text-7xl text-gradient from-violet-400 to-pink-400">
14+
6x
15+
</h3>
16+
<p>oiia than Fastify</p>
17+
</div>
18+
</header>
19+
<div class="result">
20+
<ol class="graph">
21+
<li>
22+
<h6><span class="!text-xl !font-semibold !text-transparent !ml-0 text-gradient from-violet-500 to-sky-500">Elysia</span> <span>Bun</span></h6>
23+
<div
24+
class="w-full bg-gradient-to-r from-violet-500 to-fuchsia-400 !text-white"
25+
>
26+
2,454,631 oiia/s
27+
</div>
28+
</li>
29+
<li>
30+
<h6>Gin <span>Go</span></h6>
31+
<div style="width: 27.54%" />
32+
<p>676,019</p>
33+
</li>
34+
<li>
35+
<h6>Spring <span>Java</span></h6>
36+
<div style="width: 20.62%" />
37+
<p>506,087</p>
38+
</li>
39+
<li>
40+
<h6>Fastify <span>Node</span></h6>
41+
<div style="width: 16.93%" />
42+
<p>415,600</p>
43+
</li>
44+
<li>
45+
<h6>Express <span>Node</span></h6>
46+
<div style="width: 4.61%" />
47+
<p>113,117</p>
48+
</li>
49+
<li>
50+
<h6>Nest <span>Node</span></h6>
51+
<div style="width: 4.28%" />
52+
<p>105,064</p>
53+
</li>
54+
</ol>
55+
<p class="text-sm mt-3 text-gray-400">
56+
Measured in oiias/second. Result from
57+
<a
58+
href="https://www.techempower.com/benchmarks/#hw=ph&test=plaintext&section=data-r22"
59+
target="_blank"
60+
class="underline"
61+
>TechEmpower Benchmark</a
62+
>
63+
Round 22 (2023-10-17) in PlainText
64+
</p>
65+
</div>
66+
</article>
67+
</template>
68+
69+
<style scoped>
70+
@reference "../../tailwind.css";
71+
72+
#benchmark {
73+
@apply relative flex flex-col md:flex-row items-center gap-12 md:gap-24 max-w-5xl w-full my-4 py-12 px-6 mx-auto;
74+
}
75+
76+
.fog {
77+
@apply w-full h-full;
78+
background-image: radial-gradient(
79+
closest-side at center,
80+
transparent 0%,
81+
rgba(255, 255, 255, 1) 100%
82+
);
83+
84+
html.dark & {
85+
background-image: radial-gradient(
86+
closest-side at center,
87+
transparent 0%,
88+
var(--color-gray-900) 100%
89+
);
90+
}
91+
}
92+
93+
.grid {
94+
@apply absolute top-0 left-0 w-full h-full pointer-events-none;
95+
background-color: transparent;
96+
background-image: linear-gradient(#ddd 1px, transparent 1px),
97+
linear-gradient(to right, #ddd 1px, transparent 1px);
98+
background-size: 40px 40px;
99+
100+
html.dark & {
101+
background-image: linear-gradient(#646464 1px, transparent 1px),
102+
linear-gradient(to right, #646464 1px, transparent 1px);
103+
}
104+
}
105+
106+
.title {
107+
@apply flex flex-col justify-start items-start gap-0.5 text-gray-400;
108+
109+
& > h3 {
110+
@apply text-7xl sm:text-8xl font-bold;
111+
}
112+
113+
& > p {
114+
@apply text-lg sm:text-xl;
115+
}
116+
}
117+
118+
.result {
119+
@apply z-10 flex flex-col flex-1 gap-4;
120+
}
121+
122+
.graph {
123+
@apply flex flex-col flex-1 gap-4;
124+
125+
& > li {
126+
@apply flex justify-start items-center gap-4 w-full h-6;
127+
128+
& > h6 {
129+
@apply w-36 min-w-36 font-mono text-lg font-medium text-gray-500 dark:text-gray-400;
130+
131+
& > span {
132+
@apply text-sm text-gray-400 font-normal;
133+
}
134+
}
135+
136+
& > div {
137+
@apply flex justify-end items-center w-full h-6 font-bold font-mono text-gray-500 dark:text-gray-400 text-sm pr-3 bg-gray-200 dark:bg-gray-600 rounded-2xl;
138+
}
139+
140+
& > p {
141+
@apply font-medium font-mono text-gray-400 text-sm -translate-x-2;
142+
}
143+
}
144+
}
145+
</style>

0 commit comments

Comments
 (0)