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
9 changes: 8 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,11 @@ UPSTASH_REDIS_REST_TOKEN=upstash-redis-token
NEXT_PUBLIC_MAPBOX_API=mapbox-key

# Cron (openssl rand -hex 32)
CRON_SECRET=some-random-secret
CRON_SECRET=some-random-secret

# Resend
RESEND_API_KEY=

# Supabase
SUPABASE_DB_URL=
SUPABASE_ANON_KEY=
14 changes: 10 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ Bootstrapped using the create-t3-app using:
- [Drizzle ORM](https://orm.drizzle.team/docs/overview)
- [Clerk authentication](https://clerk.com/docs)
- [Vercel](https://vercel.com)
- [Xata](https://app.xata.io)
- [Supabase](https://supabase.com/)
- Deprecated: [Xata lite](https://app.xata.io)

We use [pnpm](https://pnpm.io/) as the package manager for this project.

Expand All @@ -34,20 +35,25 @@ pnpm upgrade -L
# Database migration
pnpm drizzle-kit pull
pnpm drizzle-kit generate
pnpm drizzle-kit migrate
pnpm drizzle-kit push
```

### Notes

- UTC time
- When you make changes to the DB, please back up the data first.

## Planned Features

### Project Integration Enhancements

- Profiles will soon showcase the projects that users have contributed to, highlighting their work and collaborations.
- Profiles showcase the projects that users have contributed to, highlighting their work and collaborations.
- Applications to join our seasonal Summer and Winter projects will be directly accessible through the site for our members.
- Committee members and Administrators will gain the ability to upload project specifics directly to the platform.

### User Profile Enhancements

- The platform will support multiple role assignments for users, offering tailored experiences based on their involvement and interests.
- The platform supports multiple role assignments for users, offering tailored experiences based on their involvement and interests.
- Enhanced profile customization options will be introduced.

### Event Participation and Management
Expand Down
4 changes: 1 addition & 3 deletions drizzle.config.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
import { defineConfig } from "drizzle-kit"

import { getXataClient } from "~/server/db/xata"

export default defineConfig({
out: "./src/server/db/migrations",
schema: "./src/server/db/schema.ts",
verbose: true,
dialect: "postgresql",
tablesFilter: ["cfc-website_*"],
dbCredentials: {
url: getXataClient().sql.connectionString,
url: process.env.SUPABASE_DB_URL!,
},
})
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@
"next": "14.2.26",
"next-themes": "0.3.0",
"pg": "^8.14.1",
"pg-native": "^3.5.2",
"react": "18.3.1",
"react-day-picker": "8.10.0",
"react-dom": "18.3.1",
Expand All @@ -96,6 +97,7 @@
"@types/eslint": "8.56.6",
"@types/mapbox-gl": "3.1.0",
"@types/node": "20.12.2",
"@types/pg": "^8.16.0",
"@types/react": "18.3.3",
"@types/react-dom": "18.2.23",
"@typescript-eslint/eslint-plugin": "7.4.0",
Expand Down
81 changes: 65 additions & 16 deletions pnpm-lock.yaml

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

2 changes: 1 addition & 1 deletion src/app/dashboard/(root)/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export default async function Dashboard() {
Here you can see our upcoming projects and the projects you have participated in. You can apply for new
projects here if we link the application form.
</p>
<div className="flex h-full mb-8">
<div className="h-full mb-8">
<DashboardContent />
</div>
</div>
Expand Down
7 changes: 3 additions & 4 deletions src/app/dashboard/admin/@analytics/count.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import Link from "next/link"

import { api } from "~/trpc/server"

interface CardProps {
Expand All @@ -25,13 +23,14 @@ const Card = (props: CardProps) => {

const Count = async () => {
const count = await api.admin.analytics.getUserCount.query()
const projectCount = await api.admin.analytics.getProjectCount.query()

return (
<>
<Card heading="Users" count={count.users} icon="group" />
<Card heading="Members" count={count.members} icon="group" />
<Card heading="Projects" count={"N/A"} icon="devices" />
<Card heading="Events" count={"N/A"} icon="event" />
<Card heading="Projects" count={projectCount.publicProjects} icon="devices" />
{/* <Card heading="Events" count={"N/A"} icon="event" /> */}
</>
)
}
Expand Down
3 changes: 0 additions & 3 deletions src/app/dashboard/admin/@tools/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@ export default async function AdminUserTable() {
<div className="flex h-[50px] items-center p-1">
<h2 className="text-2xl font-semibold">Tools</h2>
</div>
<div className="grid grid-cols-1 md:grid-cols-5 gap-4">
<UpdateEmail />
</div>
<div className=" flex flex-col space-y-4 my-4">
<ExportButton data={projects} label="projects" />
<ExportButton data={payments} label="payments" />
Expand Down
Loading