abbliseng / INDA-Projekt

Fix da DMK hemsida
MIT License
0 stars 0 forks source link

INDA-Projekt

Fix da DMK hemsida -> dkm.io

START

Webapp

To host the webpage locally for the first time just run the following commands in order:

  1. cd dkm
  2. npm install
  3. npm run start

Once the inital setup is done you just need to run the third command to boot up the localhost.

DB

ALternative - docker-compose

Webscraper

To run the webscraper first make sure to have a aws credentials file with the infom profile. It should look something along the lines of:

[infom]
aws_access_key_id = YOUR_ACCESS_KEY
aws_secret_access_key = YOUR_SECRET_ACCESS_KEY

Then just run node ./fb-webscraper/scrape.js from the repo.

Repo structure

The repository is grouped into four larger subfolders.

dkm

Contains the whole react app (frontend of the application). Most noteble files are within the /src subfolder, which contains the source code.
/components house all the reoccuringly used components. Such as a carousel for displaying events or the visual loader that is shown before data has been fetched.
/pages as the name suggests contain each frontend page. The only two currently in use are events and about. Though you might still be able to visit some of the others ;^)
/style contains the styling files for the larger webpages that share some styling. Components styling is located in the aforementioned /components folder.

server

aws

This subfolder contians some of the aws functions source codes.

fb-webscraper

The server folder only contains one final script (it's been a mess). scrape.js scrapes DKMs upcoming events page and pushes these to the aws http endpoint. The reason this is currently not hosted at our own server is because the infrastructure for aws already existed so we simply had to create the lamda, api and dynamodb backend for it. It's also quite useful since we can use s3 for image storage and not have to worry about that.

Project Specification

Links