├── .eslintrc.json
├── src
├── @trpc
│ └── next-layout
│ │ ├── server
│ │ ├── index.ts
│ │ ├── local-storage.ts
│ │ └── createTrpcNextLayout.tsx
│ │ └── client
│ │ ├── index.tsx
│ │ ├── createHydrateClient.tsx
│ │ └── createTrpcNextBeta.tsx
├── app
│ ├── loading.tsx
│ ├── (auth)
│ │ ├── layout.tsx
│ │ ├── sign-in
│ │ │ └── page.tsx
│ │ └── sign-up
│ │ │ └── page.tsx
│ ├── (protected)
│ │ ├── notifications
│ │ │ └── page.tsx
│ │ ├── (home)
│ │ │ └── page.tsx
│ │ ├── search
│ │ │ └── page.tsx
│ │ ├── layout.tsx
│ │ ├── profile
│ │ │ └── page.tsx
│ │ ├── repos
│ │ │ └── [repoId]
│ │ │ │ └── page.tsx
│ │ ├── users
│ │ │ └── [username]
│ │ │ │ └── page.tsx
│ │ └── posts
│ │ │ └── [postId]
│ │ │ └── page.tsx
│ └── layout.tsx
├── lib
│ ├── utils.ts
│ ├── pusher
│ │ ├── shared.ts
│ │ ├── client.ts
│ │ └── server.ts
│ └── api
│ │ ├── server.ts
│ │ └── client.ts
├── server
│ ├── db
│ │ ├── index.ts
│ │ ├── migrations
│ │ │ ├── meta
│ │ │ │ └── _journal.json
│ │ │ ├── 0002_reflective_warhawk.sql
│ │ │ ├── 0001_silky_patch.sql
│ │ │ └── 0000_lame_silver_centurion.sql
│ │ ├── schema
│ │ │ ├── posts.ts
│ │ │ ├── comments.ts
│ │ │ ├── likes.ts
│ │ │ └── notifications.ts
│ │ └── migrate.ts
│ ├── helpers
│ │ ├── getMinuteDiff.ts
│ │ ├── clerk.ts
│ │ ├── pusher.ts
│ │ ├── trimGitHubData.ts
│ │ ├── drizzleQueries.ts
│ │ ├── notifications.ts
│ │ └── githubApi.ts
│ ├── api
│ │ ├── trpc.ts
│ │ ├── root.ts
│ │ ├── context.ts
│ │ ├── routers
│ │ │ ├── notifications.ts
│ │ │ ├── comments.ts
│ │ │ ├── like.ts
│ │ │ └── github.ts
│ │ └── procedures.ts
│ └── caches
│ │ ├── usernameCache.ts
│ │ ├── oAuthCache.ts
│ │ └── followingsCache.ts
├── components
│ ├── ui
│ │ ├── icons.tsx
│ │ ├── skeleton.tsx
│ │ ├── separator.tsx
│ │ ├── input.tsx
│ │ ├── toaster.tsx
│ │ ├── tooltip.tsx
│ │ ├── badge.tsx
│ │ ├── avatar.tsx
│ │ ├── scroll-area.tsx
│ │ ├── button.tsx
│ │ ├── tabs.tsx
│ │ ├── dialog.tsx
│ │ ├── use-toast.ts
│ │ ├── alert-dialog.tsx
│ │ └── toast.tsx
│ ├── skeletons
│ │ ├── StarSkeleton.tsx
│ │ ├── AvatarSkeleton.tsx
│ │ ├── UserCardSkeleton.tsx
│ │ └── CardSkeleton.tsx
│ ├── Loader.tsx
│ ├── heads
│ │ └── TitleHead.tsx
│ ├── FeedContents.tsx
│ ├── lists
│ │ ├── MyRepoLists.tsx
│ │ ├── RepoLists.tsx
│ │ ├── MyLikedPostLists.tsx
│ │ ├── LikedPostLists.tsx
│ │ ├── MyPostLists.tsx
│ │ ├── RepoPostLists.tsx
│ │ ├── MyCommentLists.tsx
│ │ ├── PostLists.tsx
│ │ ├── CommentLists.tsx
│ │ ├── PostCommentLists.tsx
│ │ ├── feeds
│ │ │ ├── HotPostLists.tsx
│ │ │ ├── LatestPostLists.tsx
│ │ │ └── FollowingFeedLists.tsx
│ │ └── NotificationLists.tsx
│ ├── SearchSection.tsx
│ ├── SearchResults.tsx
│ ├── ProfileContents.tsx
│ ├── CommentForm.tsx
│ ├── FollowAction.tsx
│ ├── Following.tsx
│ ├── Followers.tsx
│ ├── PostForm.tsx
│ ├── Sidebar.tsx
│ ├── cards
│ │ ├── CommentCard.tsx
│ │ ├── NotificationCard.tsx
│ │ └── RepoCard.tsx
│ └── Profile.tsx
├── helpers
│ ├── repoId.ts
│ ├── displayNumbers.ts
│ └── formatTimeAgo.ts
├── constants.ts
├── providers
│ ├── ClientProviders.tsx
│ └── PostModalProvider.tsx
├── hooks
│ ├── useRefetchTimer.tsx
│ └── usePagination.tsx
├── pages
│ └── api
│ │ ├── trpc
│ │ └── [trpc].ts
│ │ └── pusher
│ │ └── push-notification.ts
├── middleware.ts
├── validationSchemas.ts
├── styles
│ └── globals.css
├── env.mjs
└── types
│ └── github.ts
├── drizzle.config.json
├── postcss.config.js
├── .vscode
└── settings.json
├── next.config.js
├── .env.example
├── .gitignore
├── public
├── vercel.svg
└── next.svg
├── patches
└── @tanstack__react-query@4.29.3.patch
├── tsconfig.json
├── LICENSE
├── tailwind.config.js
├── package.json
└── README.md
/.eslintrc.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "next/core-web-vitals"
3 | }
4 |
--------------------------------------------------------------------------------
/src/@trpc/next-layout/server/index.ts:
--------------------------------------------------------------------------------
1 | export * from "./createTrpcNextLayout";
--------------------------------------------------------------------------------
/drizzle.config.json:
--------------------------------------------------------------------------------
1 | {
2 | "out": "./src/server/db/migrations",
3 | "schema": "./src/server/db/schema"
4 | }
5 |
--------------------------------------------------------------------------------
/src/@trpc/next-layout/client/index.tsx:
--------------------------------------------------------------------------------
1 | export * from "./createTrpcNextBeta";
2 | export * from "./createHydrateClient";
--------------------------------------------------------------------------------
/postcss.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | plugins: {
3 | tailwindcss: {},
4 | autoprefixer: {},
5 | },
6 | }
7 |
--------------------------------------------------------------------------------
/src/app/loading.tsx:
--------------------------------------------------------------------------------
1 | import Loader from "@/components/Loader";
2 |
3 | export default function LoadingPage() {
4 | return
{title}
22 |{title}
109 |Add Post
117 |129 | {user?.fullName} 130 |
131 |@{user?.username}
132 |88 | {commentOwner.name} 89 |
90 |@{commentOwner.login}
91 |105 | {comment.content} 106 |
107 | {user?.username === comment.ownerId && ( 108 |Delete
113 |{profile.name}
65 |@{profile.login}
66 |{profile.bio}
67 | 68 | {(profile.blog || profile.company) && ( 69 |handleOpen("followers")} 92 | > 93 | {displayNumbers(followers)} Followers 94 |
95 |handleOpen("following")} 99 | > 100 | {displayNumbers(profile.following ?? 0)} Following 101 |
102 |@{profile.login}
146 |151 | {notificationInfo} 152 |
153 | 154 | | {formatTimeAgo(notification.createdAt)} 155 | 156 |124 | {repo.full_name} 125 |
126 | 127 | {repo.fork && ( 128 |{repo.description}
134 | {repo.topics && ( 135 |Share repo in a post
168 |Star/Unstar the repo
195 |Fork the repo
216 |