Skip to content

Commit cd82538

Browse files
committed
improve: dev onboarding
1 parent cf432a4 commit cd82538

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+691
-589
lines changed

README.md

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -48,20 +48,15 @@
4848
<br>
4949

5050
## Create your own app
51-
Want to use cella to build your new web app? We made it simple using a short create CLI:
51+
Want to use cella to build your new web app? We made it simple using a short create CLI. Simply follow the steps to get started:
5252

5353
```bash
5454
pnpm create @cellajs/cella@latest
5555
```
5656

57-
Follow the steps in create CLI and then run your app:
58-
59-
```bash
60-
pnpm quick
61-
```
62-
6357
You now have an implementation-ready web app. 🤯! But ... without any unique functionality 🤓. Read the [Quickstart](/info/QUICKSTART.md) so you can build something unique quickly.
6458

59+
<p>&nbsp;</p>
6560

6661
## Installation
6762
For those that (also) want to participate in development:
@@ -77,7 +72,7 @@ pnpm install && pnpm quick
7772
```
7873

7974
### B. Full setup
80-
For a full setup with sync capabilityies, you need Docker. It will allow you to run Postgres instead of pglite and it will also run electric-sync. Install [Orbstack](https://orbstack.dev/) or [Docker](https://docs.docker.com/get-docker/).
75+
For a full setup with sync capabilities, you need Docker. It will allow you to run Postgres instead of pglite and it will also run electric-sync. Install [Orbstack](https://orbstack.dev/) or [Docker](https://docs.docker.com/get-docker/).
8176

8277
```bash
8378
pnpm install
@@ -96,7 +91,7 @@ Lastly, [seed](/backend/scripts/README.md) your db (with `dev` running) to sign
9691
pnpm seed
9792
```
9893

99-
Check it out at [localhost:3003](http://localhost:3003)! Generated API docs can be found at [localhost:4004/docs](http://localhost:4004/docs). Manage your local db with [local.drizzle.studio](http:local.drizzle.studio).
94+
Check it out at [localhost:3000](http://localhost:3000)! Generated API docs can be found at [localhost:4000/docs](http://localhost:4000/docs). Manage your local db with [local.drizzle.studio](http:local.drizzle.studio).
10095

10196

10297
<br />

backend/.env.example

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ NOVU_SUB_ID=
2626
NOVU_SLACK_WEBHOOK=
2727

2828
# Backend port (optional)
29-
PORT=4004
29+
PORT=4000
3030

3131
# Logtail/Better Stack (optional)
3232
LOGTAIL_TOKEN=

backend/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ const main = async () => {
3737
{
3838
fetch: app.fetch,
3939
hostname: '0.0.0.0',
40-
port: Number(env.PORT ?? '4004'),
40+
port: Number(env.PORT ?? '4000'),
4141
},
4242
() => {
4343
ascii();

backend/src/lib/errors.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ export const createError = (
5353
const data = { ...error, eventData };
5454

5555
if (logtail) logtail[severity](message, undefined, data);
56-
console.error(err);
56+
if (err) console.error(err);
5757
}
5858
// Log significant events with additional data
5959
else if (eventData) logEvent(message, eventData, severity);

backend/src/modules/attachments/index.ts

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -214,22 +214,13 @@ const attachmentsRoutes = app
214214

215215
const redirectUrl = `${config.frontendUrl}/${attachment.organizationId}/attachment/${id}`;
216216

217-
// <title>${task.summary}</title>
218-
// <meta name="twitter:title" content="${task.summary}"/>
219-
// <meta property="og:title" content="${task.summary}"/>
220-
// <meta property="og:image" content="${config.backendUrl}/${task.organizationId}/tasks/${id}/cover"/>
221-
// <meta name="twitter:image" content="${config.backendUrl}/${task.organizationId}/tasks/${id}/cover"/>
222217
return ctx.html(html`
223218
<!doctype html>
224219
<html lang="en">
225220
<head>
226221
<meta charset="utf-8" />
227222
<title>${attachment.filename}</title>
228223
<meta property="og:image" content="${config.frontendUrl}/static/images/thumbnail.png" />
229-
<meta name="twitter:image" content="${config.frontendUrl}/static/images/thumbnail.png" />
230-
<meta name="twitter:card" content="summary_large_image" />
231-
<meta name="twitter:site" content="@Cella" />
232-
<meta name="twitter:creator" content="@Cella" />
233224
<meta property="og:url" content="${redirectUrl}" />
234225
<meta property="og:type" content="website" />
235226
<meta property="og:site_name" content="Cella" />

backend/src/modules/auth/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -524,7 +524,6 @@ const authRoutes = app
524524
type: string;
525525
updated_at: string;
526526
url: string;
527-
twitter_username?: string | null;
528527
} = await githubUserResponse.json();
529528

530529
// Check if it's account link

compose.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,6 @@ services:
2424
environment:
2525
DATABASE_URL: postgresql://postgres:postgres@db:5432/postgres?sslmode=disable
2626
ports:
27-
- 3000:3000
27+
- 4200:3000
2828
depends_on:
2929
- db

config/default.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ export const config = {
6969
googleMapsKey: 'AIzaSyDMjCpQusdoPWLeD7jxkqAxVgJ8s5xJ3Co',
7070

7171
// File handling with imado
72-
tusPort: 1080,
72+
tusPort: 4100,
7373
s3UploadBucket: 'cella-uploads',
7474
s3UploadRegion: 'eu-west-1',
7575
privateCDNUrl: 'https://cdn-priv.cellajs.com',
@@ -167,8 +167,8 @@ export const config = {
167167
country: 'TypeScript Rock',
168168
googleMapsUrl: 'https://goo.gl/maps/SQlrh',
169169
scheduleCallUrl: 'https://cal.com/flip-van-haaren',
170-
twitterUrl: 'https://twitter.com/flipvanhaaren',
171-
twitterHandle: '@flipvanhaaren',
170+
blueskyUrl: 'https://bsky.app/profile/flipvh.bsky.social',
171+
blueskyHandle: '@flipvh.bsky.social',
172172
githubUrl: 'https://github.com/cellajs/cella',
173173
mapZoom: 4,
174174
coordinates: {

config/development.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ export default {
88
// senderIsReceiver: true,
99

1010
domain: '',
11-
frontendUrl: 'http://localhost:3003',
12-
backendUrl: 'http://localhost:4004',
13-
backendAuthUrl: 'http://localhost:4004/auth',
14-
tusUrl: 'http://localhost:1080',
15-
electricUrl: 'http://localhost:3000',
11+
frontendUrl: 'http://localhost:3000',
12+
backendUrl: 'http://localhost:4000',
13+
backendAuthUrl: 'http://localhost:4000/auth',
14+
tusUrl: 'http://localhost:4100',
15+
electricUrl: 'http://localhost:4200',
1616

1717
// Hide chat widget in development
1818
gleapToken: undefined,

config/tunnel.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ import type { Config } from './default';
33
export default {
44
mode: 'tunnel',
55
name: 'Cella TUNNEL',
6-
frontendUrl: 'https://localhost:3003',
6+
frontendUrl: 'https://localhost:3000',
77
backendUrl: 'http://cella.eu.ngrok.io',
88
} satisfies Config;

frontend/index.html

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,6 @@
2121
<meta property="og:site_name" content="<%= title %>" />
2222
<meta property="og:image" content="/static/images/thumbnail.png">
2323

24-
<meta name="twitter:card" content="summary_large_image">
25-
<meta name="twitter:title" content="<%= title %>">
26-
<meta name="twitter:description" content="<%= description %>">
27-
<meta name="twitter:image" content="/static/images/thumbnail.png">
28-
<meta name="twitter:site" content="<%= twitter %>">
29-
3024
<link rel="logo" type="image/png" href="/static/logo/logo.png" />
3125
<link rel="apple-touch-icon" sizes="180x180" href="/static/icons/apple-touch-icon.png" />
3226
<link rel="icon" type="image/png" sizes="512x512" href="/static/icons/icon-512x512.png" />

frontend/package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"build": "tsc && vite build",
1414
"build:dev": "cross-env NODE_ENV=development vite build --mode development",
1515
"preview": "vite preview --port 3000",
16-
"preview:dev": "cross-env NODE_ENV=development vite preview --port 3003"
16+
"preview:dev": "cross-env NODE_ENV=development vite preview --port 3000"
1717
},
1818
"dependencies": {
1919
"@atlaskit/pragmatic-drag-and-drop": "^1.4.0",
@@ -57,8 +57,8 @@
5757
"@tanstack/react-query": "5.62.7",
5858
"@tanstack/react-query-devtools": "5.62.7",
5959
"@tanstack/react-query-persist-client": "5.62.7",
60-
"@tanstack/react-router": "^1.95.1",
61-
"@tanstack/router-devtools": "^1.95.1",
60+
"@tanstack/react-router": "^1.95.3",
61+
"@tanstack/router-devtools": "^1.95.3",
6262
"@types/lodash": "^4.17.14",
6363
"@uppy/audio": "^2.1.1",
6464
"@uppy/core": "^4.4.1",
@@ -85,7 +85,7 @@
8585
"embla-carousel-autoplay": "^8.5.2",
8686
"embla-carousel-react": "^8.5.2",
8787
"emblor": "^1.4.7",
88-
"framer-motion": "^11.16.4",
88+
"framer-motion": "^11.17.0",
8989
"gleap": "^14.1.9",
9090
"hono": "4.6.16",
9191
"i18next": "^23.16.8",
@@ -129,8 +129,8 @@
129129
"@million/lint": "^1.0.14",
130130
"@redux-devtools/extension": "^3.3.0",
131131
"@rollup/plugin-terser": "^0.4.4",
132-
"@sentry/vite-plugin": "^2.22.7",
133-
"@tanstack/router-plugin": "^1.95.1",
132+
"@sentry/vite-plugin": "^2.23.0",
133+
"@tanstack/router-plugin": "^1.95.3",
134134
"@types/canvas-confetti": "^1.9.0",
135135
"@types/lodash.clonedeep": "^4.5.9",
136136
"@types/node": "^22.10.5",

frontend/src/hooks/use-copy-to-clipboard.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { useCallback, useState } from 'react';
22

33
// This hook is used to copy text to the clipboard
4-
export const useCopyToClipboard = (timeoutDuration = 1000) => {
4+
export const useCopyToClipboard = (timeoutDuration = 3000) => {
55
const [copied, setCopied] = useState(false);
66
const [error, setError] = useState<Error | null>(null);
77

frontend/src/modules/attachments/carousel.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,12 @@ import { useEventListener } from '~/hooks/use-event-listener';
55
import { AttachmentRender } from '~/modules/attachments/attachment-render';
66
import { openAttachmentDialog } from '~/modules/attachments/helpers';
77
import { Carousel as BaseCarousel, CarouselContent, CarouselDots, CarouselItem, CarouselNext, CarouselPrevious } from '~/modules/ui/carousel';
8+
import { cn } from '~/utils/cn';
89

910
interface CarouselPropsBase {
1011
slide?: number;
1112
slides?: { src: string; fileType?: string }[];
13+
classNameContainer?: string;
1214
}
1315

1416
type CarouselProps =
@@ -21,7 +23,7 @@ type CarouselProps =
2123
saveInSearchParams?: never; // Disallowed when isDialog is false
2224
});
2325

24-
const AttachmentsCarousel = ({ slides = [], isDialog = false, slide = 0, saveInSearchParams = false }: CarouselProps) => {
26+
const AttachmentsCarousel = ({ slides = [], isDialog = false, slide = 0, saveInSearchParams = false, classNameContainer }: CarouselProps) => {
2527
const navigate = useNavigate();
2628
const {
2729
search: { attachmentPreview },
@@ -84,7 +86,7 @@ const AttachmentsCarousel = ({ slides = [], isDialog = false, slide = 0, saveInS
8486
}}
8587
>
8688
<AttachmentRender
87-
containerClassName="overflow-hidden h-full relative rounded-t-[.5rem] flex items-center justify-center"
89+
containerClassName={cn('overflow-hidden h-full relative flex items-center justify-center, ', classNameContainer)}
8890
itemClassName={itemClass}
8991
type={fileType}
9092
imagePanZoom={isDialog}

0 commit comments

Comments
 (0)