diff --git a/.commitlintrc.json b/.commitlintrc.json deleted file mode 100644 index 2c46208d..00000000 --- a/.commitlintrc.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "extends": ["@commitlint/config-conventional"], - "rules": { - "type-enum": [2, "always", ["ci", "chore", "docs", "feat", "fix", "perf", "refactor", "revert", "style", "assets"]] - } -} diff --git a/.dockerignore b/.dockerignore deleted file mode 100644 index 128e852e..00000000 --- a/.dockerignore +++ /dev/null @@ -1,4 +0,0 @@ -node_modules -build -./apps/web/.env -./packages/db/.env \ No newline at end of file diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index fd79574f..00000000 --- a/.eslintrc.js +++ /dev/null @@ -1,15 +0,0 @@ -// This configuration only applies to the package manager root. -/** @type {import("eslint").Linter.Config} */ - -module.exports = { - ignorePatterns: ["apps/**", "packages/**"], - extends: ["@repo/eslint-config/library.js"], - parser: "@typescript-eslint/parser", - parserOptions: { - project: true, - }, - rules: { - "no-unused-vars": "off", - "no-redeclare": "off", - } -}; diff --git a/.github/ISSUE_TEMPLATE/bug.md b/.github/ISSUE_TEMPLATE/bug.md deleted file mode 100644 index 62c91852..00000000 --- a/.github/ISSUE_TEMPLATE/bug.md +++ /dev/null @@ -1,28 +0,0 @@ ---- -name: Bug -about: Create a report to help us improve -title: "bug: " -labels: "bug,needs-triage" -assignees: '' ---- - -**Describe the bug** -A clear and concise description of what the bug is. - -**To Reproduce** -Steps to reproduce the behavior: -1. Do something -2. See error - -**Expected behavior** -A clear and concise description of what you expected to happen. - -**Screenshots or GIFs** -If applicable, add screenshots to help explain your problem. - -**Info (please complete the following information):** - - Browser [e.g. chrome, safari] - - Version [e.g. 22] - -**Additional context** -Add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/feature.md b/.github/ISSUE_TEMPLATE/feature.md deleted file mode 100644 index 8f5b39a9..00000000 --- a/.github/ISSUE_TEMPLATE/feature.md +++ /dev/null @@ -1,19 +0,0 @@ ---- -name: Feature request -about: Suggest an idea for this project -title: 'feature: ' -labels: enhancement -assignees: '' ---- - -**Is your feature request related to a problem? Please describe.** -A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] - -**Describe the solution you'd like** -A clear and concise description of what you want to happen. - -**Describe alternatives you've considered** -A clear and concise description of any alternative solutions or features you've considered. - -**Additional context** -Add any other context or screenshots about the feature request here. diff --git a/.github/project-ideas.md b/.github/project-ideas.md deleted file mode 100644 index 5ae1ef81..00000000 --- a/.github/project-ideas.md +++ /dev/null @@ -1,202 +0,0 @@ -### Project ideas - -#### LLM-Integrated Quiz for DailyCode -##### Summary -DailyCode is a core feature of 100xDevs, designed to help developers practice and refine their coding skills. This project aims to integrate an LLM into DailyCode so that for every new module added, the LLM automatically generates quizzes. Additionally, there will be a dedicated quiz section where time-based quizzes are created, allowing users to test their understanding effectively. - -##### Expected outcomes -- LLM integration to generate quizzes dynamically for each module. -- A separate quiz section with time-based quizzes. -- A structured database for quiz storage and tracking user progress. -- A well-documented and scalable implementation. - -##### Implementation -This project will require integrating an LLM API into the DailyCode platform. The implementation will include designing a robust quiz generation system, building a UI for the quiz section, and ensuring the quizzes align with the added modules. The backend will store quiz data, track progress, and manage timing logic. - -##### Skills -- TypeScript -- PostgreSQL -- Recoil (State Management) -- TailwindCSS -- Monorepo architecture -- LLM APIs - -##### Mentors -- **Lead:** TBC -- **Support:** TBC -- **Support:** TBC - -##### Size -Expected size of project: **approximately 350 hours.** - -##### Difficulty rating -High - ---- - -#### Blogging Platform with Admin & Super Admin Dashboards -##### Summary -This project aims to transform 100xDevs into a blogging platform where users can write articles, submit them for review, and get them published by admins. An admin and super admin dashboard will be created to manage articles, approve/reject submissions, and oversee the platform. - -##### Expected outcomes -- A blogging system where users can write and submit articles. -- An admin dashboard for managing submissions. -- A super admin dashboard with higher-level controls. -- A seamless publishing workflow with role-based access control. - -##### Implementation -The project will involve building a CMS-like structure within 100xDevs. The frontend will allow users to draft and submit articles, while admins will have tools to review and publish content. Super admins will oversee all activities. The backend will manage article storage, user roles, and approval workflows. - -##### Skills -- TypeScript -- PostgreSQL -- Recoil (State Management) -- TailwindCSS -- Monorepo architecture -- Role-based access control - -##### Mentors -- **Lead:** TBC -- **Support:** TBC -- **Support:** TBC - -##### Size -Expected size of project: **approximately 350 hours.** - -##### Difficulty rating -High - ---- - -#### UI/UX Improvement and Codebase Sanitization -##### Summary -This project focuses on improving the overall UI/UX of the 100xDevs application, ensuring a better user experience while optimizing the codebase for maintainability and scalability. - -##### Expected outcomes -- A modernized and visually appealing UI with TailwindCSS. -- Improved user experience with consistent design patterns. -- Refactored and optimized code for better performance. -- Improved accessibility and responsiveness. - -##### Implementation -This will involve auditing the current UI/UX, identifying areas for improvement, and redesigning critical pages. The codebase will be refactored to improve readability, performance, and maintainability. Best practices for TailwindCSS and TypeScript will be applied. - -##### Skills -- TypeScript -- TailwindCSS -- UI/UX Design Principles -- Frontend Optimization -- Monorepo architecture - -##### Mentors -- **Lead:** TBC -- **Support:** TBC -- **Support:** TBC - -##### Size -Expected size of project: **approximately 175 hours.** - -##### Difficulty rating -Medium - ---- - -#### Supporting Solidity on Algorithmic Arena -##### Summary -Algorithmic Arena currently supports various programming languages for competitive coding. This project aims to add Solidity support, allowing developers to write and execute Solidity-based solutions within the platform. - -##### Expected outcomes -- Full integration of Solidity as a supported language. -- Execution and validation of Solidity-based solutions. -- Improved support for blockchain-based coding challenges. -- Proper sandboxing for Solidity execution. - -##### Implementation -This will involve extending the execution engine to support Solidity, integrating sandboxing mechanisms for security, and ensuring compatibility with existing problem structures. - -##### Skills -- TypeScript -- PostgreSQL -- Solidity -- Recoil (State Management) -- TailwindCSS -- Monorepo architecture - -##### Mentors -- **Lead:** TBC -- **Support:** TBC -- **Support:** TBC - -##### Size -Expected size of project: **approximately 350 hours.** - -##### Difficulty rating -Medium - ---- - -#### Ratings System for Algorithmic Arena -##### Summary -Competitive programming platforms like Codeforces have rating systems that help measure a participant's skill level. This project aims to implement a similar rating system for Algorithmic Arena. - -##### Expected outcomes -- A dynamic rating system for users. -- Algorithm-based performance evaluation. -- A leaderboard showcasing top participants. -- Backend system to update ratings after each contest. - -##### Implementation -The rating system will be based on performance metrics such as problem difficulty, time taken, and accuracy. It will be implemented on the backend with a frontend leaderboard for visibility. - -##### Skills -- TypeScript -- PostgreSQL -- Recoil (State Management) -- TailwindCSS -- Algorithm Design - -##### Mentors -- **Lead:** TBC -- **Support:** TBC -- **Support:** TBC - -##### Size -Expected size of project: **approximately 175 hours.** - -##### Difficulty rating -Easy - ---- - -#### AI-Based Test Case Generator for Algorithmic Arena -##### Summary -This project aims to use AI to generate high-quality test cases for problems in Algorithmic Arena, ensuring better coverage and reducing manual effort. - -##### Expected outcomes -- AI-powered test case generation. -- Increased problem validation accuracy. -- Automatic generation of edge cases. -- Improved overall problem-solving experience. - -##### Implementation -This will involve training AI models to analyze problem statements and generate diverse test cases, ensuring proper edge case coverage. The generated test cases will be evaluated for correctness before being integrated. - -##### Skills -- TypeScript -- PostgreSQL -- Recoil (State Management) -- TailwindCSS -- Machine Learning (AI Models) - -##### Mentors -- **Lead:** TBC -- **Support:** TBC -- **Support:** TBC - -##### Size -Expected size of project: **approximately 350 hours.** - -##### Difficulty rating -High - ---- diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md deleted file mode 100644 index 5ae008d3..00000000 --- a/.github/pull_request_template.md +++ /dev/null @@ -1,9 +0,0 @@ -### PR Fixes: -- 1 -- 2 - -Resolves #[Issue Number if there] - -### Checklist before requesting a review -- [ ] I have performed a self-review of my code -- [ ] I assure there is no similar/duplicate pull request regarding same issue diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml deleted file mode 100644 index aa7574b4..00000000 --- a/.github/workflows/cd.yml +++ /dev/null @@ -1,43 +0,0 @@ -name: Continuous Deployment -on: - push: - branches: [ main ] -jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - - name: Docker login - uses: docker/login-action@v2 - with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - - - name: Build and push - uses: docker/build-push-action@v4 - with: - context: . - file: ./Dockerfile.prod - push: true - tags: 100xdevs/dailycode-staging:${{ github.sha }} - build-args: | - DATABASE_URL=${{ secrets.STAGING_DATABASE }} - - - name: Clone staging-ops repo, update, and push - env: - PAT: ${{ secrets.PAT }} - run: | - git clone https://github.com/code100x/staging-ops.git - cd staging-ops - sed -i 's|image: 100xdevs/dailycode-staging:.*|image: 100xdevs/dailycode-staging:${{ github.sha }}|' staging/dailycode/deployment.yml - git config user.name "GitHub Actions Bot" - git config user.email "actions@github.com" - git add staging/dailycode/deployment.yml - git commit -m "Update dailycode image to ${{ github.sha }}" - git push https://${PAT}@github.com/code100x/staging-ops.git main \ No newline at end of file diff --git a/.github/workflows/cd_prod.yml b/.github/workflows/cd_prod.yml deleted file mode 100644 index ab159e27..00000000 --- a/.github/workflows/cd_prod.yml +++ /dev/null @@ -1,43 +0,0 @@ -name: Continuous Deployment (Prod) -on: - push: - branches: [ production ] -jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - - name: Docker login - uses: docker/login-action@v2 - with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - - - name: Build and push - uses: docker/build-push-action@v4 - with: - context: . - file: ./Dockerfile.prod - push: true - tags: 100xdevs/dailycode:${{ github.sha }} - build-args: | - DATABASE_URL=${{ secrets.PROD_DATABASE }} - - - name: Clone staging-ops repo, update, and push - env: - PAT: ${{ secrets.PAT }} - run: | - git clone https://github.com/code100x/staging-ops.git - cd staging-ops - sed -i 's|image: 100xdevs/dailycode:.*|image: 100xdevs/dailycode:${{ github.sha }}|' prod/dailycode/deployment.yml - git config user.name "GitHub Actions Bot" - git config user.email "actions@github.com" - git add prod/dailycode/deployment.yml - git commit -m "Update dailycode image to ${{ github.sha }}" - git push https://${PAT}@github.com/code100x/staging-ops.git main \ No newline at end of file diff --git a/.github/workflows/lint_commit.yml b/.github/workflows/lint_commit.yml deleted file mode 100644 index e9252d08..00000000 --- a/.github/workflows/lint_commit.yml +++ /dev/null @@ -1,39 +0,0 @@ -name: CommitLint, Linting and formatting -on: - pull_request: - branches: - - '**' - -jobs: - - Continuous-Integration: - - name: Performs linting, formatting on the application - runs-on: ubuntu-latest - steps: - - name: Checkout Repository - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - - name: Cache Yarn dependencies - uses: actions/cache@v2 - with: - path: ~/.cache/yarn - key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} - restore-keys: | - ${{ runner.os }}-yarn- - - - name: Install Yarn and Dependencies - run: yarn install --frozen-lockfile - - - name: Print versions - run: | - git --version - yarn --version - - - name: Run linting check - run: yarn run lint - - - name: Check formatting - run: yarn run format \ No newline at end of file diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 24500d8e..00000000 --- a/.gitignore +++ /dev/null @@ -1,40 +0,0 @@ -# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. - -# Dependencies -node_modules -.pnp -.pnp.js - -# Local env files -.env -.env.local -.env.development.local -.env.test.local -.env.production.local - -# Testing -coverage - -# Turbo -.turbo - -# Vercel -.vercel - -# Build Outputs -.next/ -out/ -build -dist - - -# Debug -npm-debug.log* -yarn-debug.log* -yarn-error.log* - -# Misc -.DS_Store -*.pem - -.idea/ diff --git a/.husky/commit-msg b/.husky/commit-msg deleted file mode 100644 index e69de29b..00000000 diff --git a/.husky/pre-commit b/.husky/pre-commit deleted file mode 100644 index c2353602..00000000 --- a/.husky/pre-commit +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/sh -. "$(dirname "$0")/_/husky.sh" - -# Define the unwanted lock files -unwanted_files=("package-lock.json" "pnpm-lock.yaml" "bun.lockb") - -# Check for unwanted lock files in the staged changes -for file in "${unwanted_files[@]}"; do - if git diff --cached --name-only | grep -qE "^$file$"; then - echo "Error: Commits containing '$file' are not allowed. Please use Yarn and remove this file from your commit." - exit 1 - fi -done - -# Allow only yarn.lock, not mandatory but should be the only lock file if present -if git diff --cached --name-only | grep -qE "^(package-lock\.json|pnpm-lock\.yaml|bun\.lockb)$"; then - echo "Error: Only 'yarn.lock' is allowed as a lock file. Please remove any other lock files from your commit." - exit 1 -fi diff --git a/.lintstagedrc b/.lintstagedrc deleted file mode 100644 index 7fc15cd8..00000000 --- a/.lintstagedrc +++ /dev/null @@ -1,3 +0,0 @@ -{ - "**/*.{ts,tsx,json}": ["prettier --write"] -} \ No newline at end of file diff --git a/.prettierignore b/.prettierignore deleted file mode 100644 index 4af73f01..00000000 --- a/.prettierignore +++ /dev/null @@ -1,10 +0,0 @@ -/.vscode -/node_modules -./dist - -*.yml -*.yaml - -*.env -.env -.env.* \ No newline at end of file diff --git a/.prettierrc b/.prettierrc deleted file mode 100644 index a11c097b..00000000 --- a/.prettierrc +++ /dev/null @@ -1,9 +0,0 @@ -{ - "singleQuote": false, - "printWidth": 120, - "bracketSpacing": true, - "tabWidth": 2, - "trailingComma": "es5", - "semi": true, - "plugins": ["prettier-plugin-tailwindcss"] -} diff --git a/.yarnrc b/.yarnrc deleted file mode 100644 index e69de29b..00000000 diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index abf84b32..00000000 --- a/Dockerfile +++ /dev/null @@ -1,11 +0,0 @@ -FROM node:20-alpine - -WORKDIR /usr/src/app - -COPY . . - -RUN yarn install - -EXPOSE 3000 - -CMD ["yarn", "run", "dev:docker"] diff --git a/Dockerfile.prod b/Dockerfile.prod deleted file mode 100644 index aebbe8b8..00000000 --- a/Dockerfile.prod +++ /dev/null @@ -1,49 +0,0 @@ -FROM node:20-alpine AS base - -FROM base AS deps -RUN set -ex; \ - apk update; \ - apk add --no-cache \ - libc6-compat \ - openssl - -WORKDIR /usr/src/app - -COPY package.json yarn.lock* ./ -COPY apps/web/package.json ./apps/web/ -COPY packages/ ./packages/ - -RUN yarn install --ignore-scripts - -FROM base AS builder -WORKDIR /usr/src/app - -COPY --from=deps /usr/src/app/node_modules ./node_modules -COPY . . - -RUN yarn global add turbo@^2.1.1 -RUN DATABASE_URL=$DATABASE_URL npx prisma@5.12.0 generate --schema packages/db/prisma/schema.prisma - -RUN cd apps/web && yarn add sharp -RUN yarn turbo run build --filter=web... - -FROM base AS runner -WORKDIR /usr/src/app - -RUN addgroup --system --gid 1001 nodejs -RUN adduser --system --uid 1001 nextjs - -RUN mkdir .next && chown nextjs:nodejs .next - -USER nextjs - -COPY --from=builder --chown=nextjs:nodejs /usr/src/app/apps/web/.next/standalone ./ -COPY --from=builder --chown=nextjs:nodejs /usr/src/app/apps/web/.next/static ./apps/web/.next/static -COPY --from=builder --chown=nextjs:nodejs /usr/src/app/apps/web/public ./apps/web/public - -EXPOSE 3000 -ENV NODE_ENV production -ENV PORT 3000 -ENV HOSTNAME "0.0.0.0" - -CMD ["node", "apps/web/server.js"] \ No newline at end of file diff --git a/LICENSE b/LICENSE deleted file mode 100644 index 669d43e6..00000000 --- a/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2025 code100x - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/README.md b/README.md deleted file mode 100644 index ee074eff..00000000 --- a/README.md +++ /dev/null @@ -1,43 +0,0 @@ -# Quick Setup Locally - -## Option 1: Using Docker - -```bash -docker compose watch -``` - -## Option 2: Manual Setup - -### 1. Install Dependencies -```bash -cd daily-code -yarn install -``` - -### 2. Setup Database - -#### For Mac and Linux users -```bash -cd packages/db -chmod +x ./setupDB.sh -./setupDB.sh -``` - -#### For Windows users -```bash -cd packages/db -copy .env.example .env -docker-compose up - -# Configure the database connection -# Add your connection string to DATABASE_URL - -yarn prisma migrate dev -yarn prisma db seed -``` - -### 3. Run Locally -```bash -cd ../.. -yarn run dev -``` diff --git a/apps/web/.env.example b/apps/web/.env.example deleted file mode 100644 index 703891dc..00000000 --- a/apps/web/.env.example +++ /dev/null @@ -1,13 +0,0 @@ -GITHUB_ID="" -GITHUB_SECRET="" -GOOGLE_CLIENT_ID="" -GOOGLE_CLIENT_SECRET="" -NEXTAUTH_URL="http://localhost:3000" -NEXTAUTH_SECRET="NEXTAUTH_SECRET" - -GOOGLEAI_API_KEY= -QDRANT_API_KEY= -QDRANT_URL= -VECTOR_DIMENSION=768 # Upto 768 dimensions are supported - -CACHE_EXPIRE=1800 # expiration time of the cache memory \ No newline at end of file diff --git a/apps/web/.eslintrc.js b/apps/web/.eslintrc.js deleted file mode 100644 index 7d644a4c..00000000 --- a/apps/web/.eslintrc.js +++ /dev/null @@ -1,9 +0,0 @@ -/** @type {import("eslint").Linter.Config} */ -module.exports = { - root: true, - extends: ["@repo/eslint-config/next.js"], - parser: "@typescript-eslint/parser", - parserOptions: { - project: true, - }, -}; diff --git a/apps/web/README.md b/apps/web/README.md deleted file mode 100644 index 95ec786e..00000000 --- a/apps/web/README.md +++ /dev/null @@ -1,29 +0,0 @@ -## Getting Started - -First, run the development server: - -yarn dev - -``` - -Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. - -You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file. - -To create [API routes](https://nextjs.org/docs/app/building-your-application/routing/router-handlers) add an `api/` directory to the `app/` directory with a `route.ts` file. For individual endpoints, create a subfolder in the `api` directory, like `api/hello/route.ts` would map to [http://localhost:3000/api/hello](http://localhost:3000/api/hello). - -## Learn More - -To learn more about Next.js, take a look at the following resources: - -- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API. -- [Learn Next.js](https://nextjs.org/learn/foundations/about-nextjs) - an interactive Next.js tutorial. - -You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome! - -## Deploy on Vercel - -The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_source=github.com&utm_medium=referral&utm_campaign=turborepo-readme) from the creators of Next.js. - -Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details. -``` diff --git a/apps/web/app/(marketing)/(policy)/privacy-policy/page.tsx b/apps/web/app/(marketing)/(policy)/privacy-policy/page.tsx deleted file mode 100644 index 69255cd4..00000000 --- a/apps/web/app/(marketing)/(policy)/privacy-policy/page.tsx +++ /dev/null @@ -1,18 +0,0 @@ -import { privacyPolicyContent } from "../../../../components/privacy-policy/privacy-policy"; - -const PrivacyPolicyPage = () => { - return ( -
-

Privacy Policy

- {privacyPolicyContent.map((item) => { - return ( -
-

{item.description}

-
- ); - })} -
- ); -}; - -export default PrivacyPolicyPage; diff --git a/apps/web/app/(marketing)/layout.tsx b/apps/web/app/(marketing)/layout.tsx deleted file mode 100644 index 474d9f2a..00000000 --- a/apps/web/app/(marketing)/layout.tsx +++ /dev/null @@ -1,15 +0,0 @@ -import React from "react"; -import Footer from "../../screens/footer"; -import { AppbarClient } from "../../components/AppbarClient"; - -const MarketingLayout = ({ children }: { children: React.ReactNode }) => { - return ( -
- - {children} -
- ); -}; - -export default MarketingLayout; diff --git a/apps/web/app/(marketing)/tnc/page.tsx b/apps/web/app/(marketing)/tnc/page.tsx deleted file mode 100644 index 865a2351..00000000 --- a/apps/web/app/(marketing)/tnc/page.tsx +++ /dev/null @@ -1,27 +0,0 @@ -import { tncContent } from "../../../components/tnc/tnc-content"; - -const TermsAndConditionsPage = () => { - return ( -
-

Terms & Conditions

- {tncContent.map((item) => { - return ( -
-

{item.description}

- {item.points?.map((point) => { - return ( -

- {point.id} - {". "} - {point.description} -

- ); - })} -
- ); - })} -
- ); -}; - -export default TermsAndConditionsPage; diff --git a/apps/web/app/admin/layout.tsx b/apps/web/app/admin/layout.tsx deleted file mode 100644 index 0f0dd98b..00000000 --- a/apps/web/app/admin/layout.tsx +++ /dev/null @@ -1,37 +0,0 @@ -import { getServerSession } from "next-auth"; -import { authOptions } from "../../lib/auth"; -import Link from "next/link"; -import { LockClosedIcon } from "@radix-ui/react-icons"; -import { ReactNode } from "react"; - -export default async function AdminLayout({ children }: { children: ReactNode }) { - const session = await getServerSession(authOptions); - - if (!session?.user?.admin) { - return ( -
-
-
- -
-

Access Denied

-

- You do not have permission to access this page. -

-
-
-
- - Return to the homepage - -
-
-
- ); - } else { - return <>{children}; - } -} diff --git a/apps/web/app/admin/page.tsx b/apps/web/app/admin/page.tsx deleted file mode 100644 index 361eee90..00000000 --- a/apps/web/app/admin/page.tsx +++ /dev/null @@ -1,11 +0,0 @@ -import { AppbarClient } from "../../components/AppbarClient"; -import { Admin } from "../../screens/Admin"; - -export default async function AdminPage() { - return ( - <> - - - - ); -} diff --git a/apps/web/app/api/AddTracks/route.ts b/apps/web/app/api/AddTracks/route.ts deleted file mode 100644 index 26b0111d..00000000 --- a/apps/web/app/api/AddTracks/route.ts +++ /dev/null @@ -1,33 +0,0 @@ -import { getServerSession } from "next-auth"; -import { NextRequest, NextResponse } from "next/server"; -import { NotionAPI } from "notion-client"; -import { authOptions } from "../../../lib/auth"; - -export async function POST(req: NextRequest) { - const session = await getServerSession(authOptions); - - if (!session?.user?.admin) { - return NextResponse.json({ message: "Unauthorized" }, { status: 401 }); - } - const body = await req.json(); - const notionId = body.notionId; - const notion = new NotionAPI(); - try { - const recordMap = await notion.getPage(notionId); - const data = Object.keys(recordMap.block).filter((key) => { - const block = recordMap.block[key]; - return block?.role !== "none" - }).map((key) => { - const block = recordMap.block[key]; - return { - notionDocId: block?.value.id, - title: block?.value?.properties?.title[0][0], - }; - }); - data.shift(); - data.pop(); - return NextResponse.json(data); - } catch (e) { - return NextResponse.json(e); - } -} diff --git a/apps/web/app/api/auth/[...nextauth]/route.ts b/apps/web/app/api/auth/[...nextauth]/route.ts deleted file mode 100644 index 9b5aa4ed..00000000 --- a/apps/web/app/api/auth/[...nextauth]/route.ts +++ /dev/null @@ -1,6 +0,0 @@ -import NextAuth from "next-auth"; -import { authOptions } from "../../../../lib/auth"; - -const handler = NextAuth(authOptions); - -export { handler as GET, handler as POST }; diff --git a/apps/web/app/api/revalidate/route.ts b/apps/web/app/api/revalidate/route.ts deleted file mode 100644 index 94507715..00000000 --- a/apps/web/app/api/revalidate/route.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { revalidatePath } from "next/cache"; -import { NextRequest, NextResponse } from "next/server"; - -export async function GET(req: NextRequest) { - const fromQuery = req.nextUrl.searchParams.get("secret"); - const path = req.nextUrl.searchParams.get("path"); - - if (fromQuery != process.env.MY_SECRET_TOKEN) { - return NextResponse.json({ message: "Invalid token" }, { status: 401 }); - } - try { - if (path) { - revalidatePath(path); - return NextResponse.json({ revalidated: true, now: Date.now() }); - } - } catch (e) { - return NextResponse.json({ message: "Error revalidating" }, { status: 500 }); - } -} diff --git a/apps/web/app/assets/github.svg b/apps/web/app/assets/github.svg deleted file mode 100644 index f0adadc9..00000000 --- a/apps/web/app/assets/github.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/apps/web/app/assets/google.svg b/apps/web/app/assets/google.svg deleted file mode 100644 index 8c4d6453..00000000 --- a/apps/web/app/assets/google.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/apps/web/app/auth/page.tsx b/apps/web/app/auth/page.tsx deleted file mode 100644 index 415e7452..00000000 --- a/apps/web/app/auth/page.tsx +++ /dev/null @@ -1,8 +0,0 @@ -import { Suspense } from "react"; -import Signin from "../../components/Signin"; - -const SigninPage = async () => { - return ; -}; - -export default SigninPage; diff --git a/apps/web/app/canva-track/[...trackIds]/page.tsx b/apps/web/app/canva-track/[...trackIds]/page.tsx deleted file mode 100644 index 5c9c08ea..00000000 --- a/apps/web/app/canva-track/[...trackIds]/page.tsx +++ /dev/null @@ -1,71 +0,0 @@ -"use client"; - -import React from "react"; -import { useSearchParams } from "next/navigation"; -import { motion } from "framer-motion"; -import Link from "next/link"; -import Image from "next/image"; - -const Header = ({ title }: { title: string }) => ( - -
- -
- - Logo - -

{title}

-
-
-
-
-); - -export default function CanvaTrack() { - const searchParams = useSearchParams(); - const canvaLink = searchParams.get("canvaLink"); - const title = searchParams.get("title"); - - const embedUrl = canvaLink?.includes("?embed") ? canvaLink : `${canvaLink}?embed`; - - console.log({ canvaLink, embedUrl }); - - if (!embedUrl) { - return
No Canva presentation link provided
; - } - - return ( -
-
-
-
-