Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
NEXT_PUBLIC_ROOT_URL=http://localhost:3000

# Database
DATABASE_URL=
DATABASE_URL='http://127.0.0.1:8080' # This should be the URL when using default Turso CLI settings.
DATABASE_AUTH_TOKEN=

# Authentication
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ yarn-error.log*
**/public/worker-*.js.map

*.db
*.db*
.obsidian/**

.env.local
.env.local
11 changes: 3 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,15 @@ All release notes can be found at [https://serial.tube/releases](https://serial.
Getting up and running with Serial is easy. Here are the steps you need to start developing locally:

1. Clone the repository locally
2. Duplicate the `.env.example` file, and rename the copy to `.env`
3. Create a new database on [Turso](https://turso.tech/)
1. Sign up for an account if you don't have one, and navigate to the database dashboard
2. Create a new database
3. In the top right dropdown menu, click "Create Token"
4. Create a token with read and write permissions
5. On the success screen, save the top value as `DATABASE_AUTH_TOKEN` and the bottom as `DATABASE_URL`
2. Install the Turso CLI: https://github.com/tursodatabase/turso-cli
3. Duplicate the `.env.example` file, and rename the copy to `.env`
4. Navigate to [Better Auth](https://www.better-auth.com/docs/installation#set-environment-variables) and generate an auth secret. Set this as `BETTER_AUTH_SECRET`
5. (optional) Create an account on [Sendgrid](https://sendgrid.com/en-us) and set up a mailing address.
- This is not necessary to get up and running, but is needed if you'd like working password reset and other email-related functionality.
6. Install your packages with `pnpm`
1. If you don't have it already, install [pnpm](https://pnpm.io/)
2. Run `pnpm i` to install packages
7. That's it! Run `pnpm dev` to migrate your database for the first time and boot up the development server.
7. That's it! Run `pnpm dev` to create, migrate, and run your database for the first time, then boot up the development server.

## Self Hosting

Expand Down
8 changes: 6 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@
"private": true,
"type": "module",
"scripts": {
"dev": "pnpm schema:migrate && next dev --turbopack",
"dev:db": "turso dev --db-file serial.db",
"dev:migrate": "pnpm schema:migrate",
"dev:run": "next dev --turbopack",
"dev": "concurrently --kill-others \"pnpm dev:db\" \"pnpm dev:migrate && pnpm dev:run\"",
"dev:email": "email dev --dir ./src/emails --port 4000",
"build": "next build --turbopack && pnpm schema:migrate && node --import=tsx ./src/server/scripts/addIdsToFeedItems.ts",
"build:atomic": "next build --turbopack",
Expand Down Expand Up @@ -70,7 +73,6 @@
"cmdk": "^1.1.1",
"core-js": "3.47.0",
"dayjs": "^1.11.19",
"drizzle-orm": "^0.44.7",
"drizzle-zod": "^0.8.3",
"embla-carousel-react": "^8.6.0",
"fast-xml-parser": "^5.3.1",
Expand Down Expand Up @@ -116,8 +118,10 @@
"@typescript-eslint/eslint-plugin": "^8.46.3",
"@typescript-eslint/parser": "^8.46.3",
"better-sqlite3": "^12.4.1",
"concurrently": "^9.2.1",
"dotenv": "^17.2.3",
"drizzle-kit": "^0.31.6",
"drizzle-orm": "^0.44.7",
"eslint": "^9.39.1",
"eslint-config-next": "16.0.1",
"mysql2": "^3.15.3",
Expand Down
104 changes: 95 additions & 9 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 7 additions & 9 deletions src/app/(feed)/feed/SidebarFeeds.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { useAtom, useAtomValue, useSetAtom } from "jotai";
import {
AlertCircleIcon,
AlertTriangleIcon,
CircleSmall,
Edit2Icon,
MinusIcon,
Expand All @@ -18,6 +17,11 @@ import {
SidebarMenuButton,
SidebarMenuItem,
} from "~/components/ui/sidebar";
import {
Tooltip,
TooltipContent,
TooltipTrigger,
} from "~/components/ui/tooltip";
import {
categoryFilterAtom,
dateFilterAtom,
Expand All @@ -28,21 +32,15 @@ import {
import { useFeedCategories } from "~/lib/data/feed-categories";
import { doesFeedItemPassFilters } from "~/lib/data/feed-items";
import { useFeeds } from "~/lib/data/feeds";
import { useDeselectViewFilter } from "~/lib/data/views";
import { useDialogStore } from "./dialogStore";
import {
useFeedItemsDict,
useFeedItemsOrder,
useFeedStatusDict,
useFetchFeedItemsStatus,
} from "~/lib/data/store";
import {
Tooltip,
TooltipContent,
TooltipTrigger,
} from "~/components/ui/tooltip";
import { error } from "node:console";
import { useDeselectViewFilter } from "~/lib/data/views";
import { ApplicationFeed } from "~/server/db/schema";
import { useDialogStore } from "./dialogStore";

function useCheckFilteredFeedItemsForFeed() {
const feedItemsOrder = useFeedItemsOrder();
Expand Down
2 changes: 1 addition & 1 deletion src/lib/iterators.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
export function prepareArrayChunks<T>(list: T[], length: number) {
let chunks: T[][] = [];
for (let i = 0; i < list.length; i += length) {
const end = Math.min(i + length, list.length - 1);
const end = Math.min(i + length, list.length);
chunks.push(list.slice(i, end));
}
return chunks;
Expand Down