+ Student Management +
+AndrΓ© Eriksson
+ + andree4@kth.se + +Not implemented yet
+diff --git a/.github/workflows/deploy_backend.yml b/.github/workflows/deploy_backend.yml deleted file mode 100644 index 8dafe036..00000000 --- a/.github/workflows/deploy_backend.yml +++ /dev/null @@ -1,51 +0,0 @@ -name: Deploy backend - -on: - push: - branches: - - master - -env: - PROJECT_ID: ${{ secrets.RUN_PROJECT }} - RUN_REGION: europe-north1 - SERVICE_NAME: medieteknik-api - -jobs: - setup-build-deploy: - name: Setup, Build, and Deploy - runs-on: ubuntu-latest - - steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Set up Python 3.8 - uses: actions/setup-python@v2 - with: - python-version: '3.8' - - # Setup gcloud CLI - - id: 'auth' - uses: 'google-github-actions/auth@v1' - with: - credentials_json: ${{ secrets.RUN_SA_KEY }} - - - uses: google-github-actions/setup-gcloud@v1 - with: - version: '363.0.0' - project_id: ${{ secrets.RUN_PROJECT }} - - # Build and push image to Google Container Registry - - name: Build - run: |- - gcloud builds submit api \ - --quiet \ - --tag "gcr.io/$PROJECT_ID/$SERVICE_NAME:$GITHUB_SHA" - # Deploy image to Cloud Run - - name: Deploy - run: |- - gcloud run deploy "$SERVICE_NAME" \ - --quiet \ - --region "$RUN_REGION" \ - --image "gcr.io/$PROJECT_ID/$SERVICE_NAME:$GITHUB_SHA" \ - --platform "managed" \ - --allow-unauthenticated diff --git a/.github/workflows/deploy_frontend.yml b/.github/workflows/deploy_frontend.yml deleted file mode 100644 index c59ab527..00000000 --- a/.github/workflows/deploy_frontend.yml +++ /dev/null @@ -1,38 +0,0 @@ -name: Deploy frontend - -on: - push: - branches: [ master ] - -jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v1.4.4 - - run: npm install - working-directory: app - - run: npm run build - working-directory: app - env: - CI: false - NODE_OPTIONS: --max_old_space_size=4096 - - uses: actions/upload-artifact@master - with: - name: build - path: app/build - deploy: - runs-on: ubuntu-latest - needs: [build] - steps: - - uses: actions/checkout@v2 - - uses: actions/download-artifact@master - with: - name: build - path: app/build - - uses: w9jds/firebase-action@master - with: - args: deploy --only hosting - env: - FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }} - PROJECT_PATH: ./app diff --git a/.github/workflows/firebase-hosting-pull-request.yml b/.github/workflows/firebase-hosting-pull-request.yml new file mode 100644 index 00000000..c6a544d1 --- /dev/null +++ b/.github/workflows/firebase-hosting-pull-request.yml @@ -0,0 +1,25 @@ +# This file was auto-generated by the Firebase CLI +# https://github.com/firebase/firebase-tools + +name: Deploy to Firebase Hosting on PR +on: + pull_request: + push: + branches: + - master +permissions: + checks: write + contents: read + pull-requests: write +jobs: + build_and_preview: + if: ${{ github.event.pull_request.head.repo.full_name == github.repository }} + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - run: npm ci && npm run build + - uses: FirebaseExtended/action-hosting-deploy@v0 + with: + repoToken: ${{ secrets.GITHUB_TOKEN }} + firebaseServiceAccount: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_MEDIETEKNIK }} + projectId: medieteknik diff --git a/backend/Dockerfile b/backend/Dockerfile index c8a27a1b..d0808efa 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -13,8 +13,6 @@ WORKDIR /app COPY . /app COPY env/service-account-file.json /app/service-account-file.json -# Set up the relevant environment variable -ENV GOOGLE_APPLICATION_CREDENTIALS="/app/service-account-file.json" # Install any needed packages specified in requirements.txt RUN pip install --trusted-host pypi.python.org -r requirements.txt diff --git a/frontend/.firebase/hosting.cHVibGlj.cache b/frontend/.firebase/hosting.cHVibGlj.cache new file mode 100644 index 00000000..38f5eb55 --- /dev/null +++ b/frontend/.firebase/hosting.cHVibGlj.cache @@ -0,0 +1,32 @@ +index.html,1725154496799,d9d7bc4ab8a92b15cc2009280fe4aea0d497560fe7b84d597ebcd2ad04f7c317 +404.html,1725154496712,762bf484ba67404bd1a3b181546ea28d60dfddf18e9dd4795d8d25bcf3c1a890 +images/logo.webp,1720431006580,2e2ed372391f67e94e94c4e0fecb24320da557538daa7fb4eabf4b7f411e9681 +images/svg/youtube.svg,1710785650591,e9016d78170c690d49d935a91bd81e02a734d4abafc67b0747ae8e803c827aab +images/svg/ths.svg,1717953182261,5b1b5af7e08278a04437bfe6030dfce7ea53232079ad7388f70ee247c90dac8b +images/svg/linkedin.svg,1710787637900,d01bff426eb95b311bccd560e257c1a426d0789b3721b80b8aa6e2223e363a3f +images/svg/mbd.svg,1711051608799,6d486107a644d05cc58f7ecc67eeb6f433540450d21835b17a1cecbf7b972e35 +images/svg/medieteknik.svg,1717953208687,20a606c6b0f7ab0fbb9092d9f70c6a76c33a366768dd5ce7cd1a4aade30a10c5 +images/svg/instagram.svg,1710785600065,a093432cf165a98aa1a6b49122fe951860ca71dd9d4727a45ca9ec388b39544c +images/cs.jpg,1708855444172,3a8f31249f57a708100ed5e597bbd003e8d706d9a6318436299ccef0934da9ce +images/svg/datateknik.svg,1717954310511,7e222db520ffa91ed3eadfd3fa85812a277a5bf45ae8630d5a98f4306f332c26 +images/logobig_light.jpg,1713814110573,25b0591ae761e535a9ef043dd0740647fa78b3df140442cd4390656040e45665 +images/logobig_dark.jpg,1714179224566,9d5e1feb5cd3ca7b6a70f0118bf9c159e4f73e6c245dd1c942bf8788bad2d903 +images/logobig.png,1710782675272,7bc0f40f5bf714f1b70ccb4fbc1f0a6627afcb3136b2aad436b8ca678294a15a +images/svg/facebook.svg,1710784995921,410040bc378c6c86fd75695f1f2a4eb749ad0ad1c53dfbe451d7f4981960086b +images/ict.jpg,1708856955078,8a840e4b6ca2f83901c1e34ec8abd8fd9802343d39c5fb7dc94443d79ea65ee3 +images/sd.jpg,1709014945099,fa0727975b29d57738a268da4e7e262cdcb75b061285bc8ef1b0d39bed9322c7 +screenshots/phone.webp,1720428750813,09a5b82e9868b09f5a93ff1398bb8212ec54b74cdd8a64a3db8723de953016c5 +images/ml.jpg,1708856962239,8138b0b058ca7752ee40cc32cc4aa25d9d854d5165e4880d5d32e82aafaa6be7 +images/svg/kth.svg,1711063787967,04db06aa8f5073b9693efb4ffa236e1df2fca8776a31265bde377c07fb8950d7 +images/imt.jpg,1708856946101,503fec3af341c92bfb964b5f7332cd773429e63dfbd059599dcd79a7de1becae +images/KTH.jpg,1711828165385,4f497bda7e0c7f3b997214c01c0dcc389a5546218ff43275ec7a40a75b0bd93f +screenshots/desktop.webp,1720428118145,fb766eed3c7cb6c53358353f3c0d83346d55c386f8b8a543926266ec71872a5b +images/testbg.jpg,1709696850461,02ac934a8ce6cb7efa6917f3c7853e084a969d34d4cd4cf635f53fe983b068c9 +images/ths_placeholder.jpg,1709687564492,af2c7227a1247730687e733f1daff25129f7f3ddd4497d2dab6c3afd2f6e2356 +images/kth-landskap.jpg,1711819019756,b28a8cb7a0e430bf961ecf7870100d1b83ab8660476a1fca0b36f73aa313d20a +images/kth-landskap.webp,1721805296540,5c9b68ff00d4ea5981d7776bc57f0bb5acca568e57175c974c54993d0934d8d3 +images/international_placeholder.jpg,1709687695136,ca11b7b0dc9562294ad4b1e0d778243b1b4cdb1d7daf8bb5f6f7749f6ffc3976 +images/bg.webp,1720432387556,56af6239eed0080c917231b4e1e2fabfea36de843c5004b92e9941461e81c11f +images/testbg2.jpg,1696497351214,ba0e6b61f35bde9dd9949426da569529ec7b33d63fbdbab307b99a0b14217046 +images/bg2.webp,1723934109217,5848c87093a6345d24e8891469b68ab4916aba33add37dd0faa4b5d1d9491119 +images/bg2.jpg,1723589234023,b05c4b16cfe029c4a04ec98a3d92dd767efc0ce149d46fc31f46b48902d1feb9 diff --git a/frontend/.firebaserc b/frontend/.firebaserc new file mode 100644 index 00000000..aac32933 --- /dev/null +++ b/frontend/.firebaserc @@ -0,0 +1,5 @@ +{ + "projects": { + "default": "medieteknik" + } +} diff --git a/frontend/firebase-debug.log b/frontend/firebase-debug.log new file mode 100644 index 00000000..a8c41515 --- /dev/null +++ b/frontend/firebase-debug.log @@ -0,0 +1,25 @@ +[debug] [2024-09-01T01:41:52.373Z] ---------------------------------------------------------------------- +[debug] [2024-09-01T01:41:52.375Z] Command: C:\Program Files\nodejs\node.exe C:\Users\andre\AppData\Roaming\npm\node_modules\firebase-tools\lib\bin\firebase.js init hosting:github +[debug] [2024-09-01T01:41:52.375Z] CLI Version: 13.16.0 +[debug] [2024-09-01T01:41:52.375Z] Platform: win32 +[debug] [2024-09-01T01:41:52.376Z] Node Version: v21.5.0 +[debug] [2024-09-01T01:41:52.376Z] Time: Sun Sep 01 2024 03:41:52 GMT+0200 (Central European Summer Time) +[debug] [2024-09-01T01:41:52.376Z] ---------------------------------------------------------------------- +[debug] +[debug] [2024-09-01T01:41:52.432Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"] +[debug] [2024-09-01T01:41:52.433Z] > authorizing via signed-in user (webmaster@medieteknik.com) +[info] + ######## #### ######## ######## ######## ### ###### ######## + ## ## ## ## ## ## ## ## ## ## ## + ###### ## ######## ###### ######## ######### ###### ###### + ## ## ## ## ## ## ## ## ## ## ## + ## #### ## ## ######## ######## ## ## ###### ######## + +You're about to initialize a Firebase project in this directory: + + D:\Programming\Medieteknik\medieteknik.com\frontend + +Before we get started, keep in mind: + + * You are initializing within an existing Firebase project directory + diff --git a/frontend/firebase.json b/frontend/firebase.json new file mode 100644 index 00000000..621dfef6 --- /dev/null +++ b/frontend/firebase.json @@ -0,0 +1,14 @@ +{ + "hosting": { + "public": "public", + "ignore": [ + "firebase.json", + "**/.*", + "**/node_modules/**" + ] + }, + "remoteconfig": { + "template": "remoteconfig.template.json" + }, + "extensions": {} +} diff --git a/frontend/public/404.html b/frontend/public/404.html new file mode 100644 index 00000000..829eda8f --- /dev/null +++ b/frontend/public/404.html @@ -0,0 +1,33 @@ + + +
+ + +The specified file was not found on this website. Please check the URL for mistakes and try again.
+This page was generated by the Firebase Command-Line Interface. To modify it, edit the 404.html
file in your project's configured public
directory.
You're seeing this because you've successfully setup Firebase Hosting. Now it's time to go build something extraordinary!
+ Open Hosting Documentation +Firebase SDK Loading…
+ + + + diff --git a/frontend/remoteconfig.template.json b/frontend/remoteconfig.template.json new file mode 100644 index 00000000..9e26dfee --- /dev/null +++ b/frontend/remoteconfig.template.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/frontend/src/app/[language]/admin/admin.tsx b/frontend/src/app/[language]/admin/admin.tsx new file mode 100644 index 00000000..2e645274 --- /dev/null +++ b/frontend/src/app/[language]/admin/admin.tsx @@ -0,0 +1,116 @@ +import { Head } from '@/components/static/Static' +import { Tabs, TabsContent, TabsList, TabsTrigger } from '@/components/ui/tabs' +import { + Breadcrumb, + BreadcrumbItem, + BreadcrumbLink, + BreadcrumbList, + BreadcrumbPage, + BreadcrumbSeparator, +} from '@/components/ui/breadcrumb' +import { + Card, + CardContent, + CardDescription, + CardFooter, + CardHeader, + CardTitle, +} from '@/components/ui/card' +import { + ArrowTrendingUpIcon, + ChevronDownIcon, + Cog8ToothIcon, + NewspaperIcon, + PresentationChartLineIcon, + ServerStackIcon, + UserGroupIcon, + UsersIcon, +} from '@heroicons/react/24/outline' +import { Input } from '@/components/ui/input' +import { Button } from '@/components/ui/button' +import Dashboard from './pages/dashboard' +import Link from 'next/link' + +export default function Admin({ + params: { language }, +}: { + params: { language: string } +}) { + return ( +AndrΓ© Eriksson
+ + andree4@kth.se + +Not implemented yet
+