---
# System prepended metadata

title: FAC26 | Week 4 | Server Side App

---

# FAC26 | Week 4 | Server Side App

## Social Agenda | Team 2 

---

You can view the project [here](https://frosty-sky-4626.fly.dev/).

### Contributors:

Georgia, Konstantina, Natalia

---

## Social Agenda :calendar:

A Node/Express server-rendered application with a SQLite database

Social Agenda is a web app that allows users to post their events if they are logged in. 💃

---

#### Technical Requirements

- [x] Express server
- [x] Modular codebase
- [x] SQLite database
- [x] Hosted on Fly.io
- [x] Social Login (OAuth) using a 3rd party account: Github
- [x] Server-side validation of user-submitted data
- [ ] Error handling and informative error messages for the user
- [x] Styled for a professional user-experience

---

#### User Stories

1. As a user, I want to be able to sign up for the application using my GitHub account.
2. As a user, I want to be able to log into the application using GitHub account.
3. As a user, I want to be able to submit data to the application, and have it validated on the server-side.
4. As a user, I want to receive informative error messages if my data submission is invalid.
5. As a user, I want to have a professional and visually appealing user-interface when using the application.

---

## Challenges

---

### Death by semi-colon

<img src="https://media.giphy.com/media/1jkUZsWVnVcN5YFf4o/giphy.gif"/>

---

:x: 
```
CLIENT_ID=xxxxxxxxxxxxxxxxxxxx;
CLIENT_SECRET=5xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx;
```
:heavy_check_mark: 
```
CLIENT_ID=xxxxxxxxxxxxxxxxxxxx
CLIENT_SECRET=5xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
```
---

## .env & .gitignore

---

You should use your .gitignore file to ignore the .env file

Warning: If your .env is already part of your Git repository, adding it to .gitignore will not remove it. In this case, you’ll also need to tell Git to stop tracking .env, which you can do with

    git rm --cached .env
    
This will delete .env from your repo, but leave it on your local machine (and now your .gitignore will cause it to be ignored).

---

## KSBs Konstantina 

D17 Deploy staging environments
Support delivery of one or more software deployment phases, such as trials and final release, to ensure that software developer outcomes are deployed correctly


S10
Build, manage and deploy code into the relevant environment

D8
Design secure solutions
Consider security implications of proposed design to ensure that security considerations are built in from inception and throughout the development process.


---

## KSBs Natalia

K
Software design approaches and patterns, to identify reusable solutions to commonly occurring problems

S
apply structured techniques to problem solving, debug code and understand the structure of programmes in order to identify and resolve issues

---


## UX Lead

- Created professional and visually appealing 
  user-interface using CSS
- Lead on project documentation by regularly updating the `README.md` file

---
       

## Scrum Facilitator | G :right-facing_fist: :left-facing_fist:

:heavy_check_mark: Prioritised issues
:thinking_face: Considered the day ahead and EOD reflections

---

:tomato: Pomodoro (sometimes)


---

### G | KSBs | :floppy_disk: 

 X KSB 1
 
 X KSB 2

---


## DevOps 

- Set up repo and file structure/ set up linting :heavy_check_mark: 
- :flying_saucer: Set up deployment to fly.io and take ongoing responsibility


---

##  | KSBs 💾

K6: How teams work effectively to produce software and how to contribute appropriately

S7: Apply structured techniques to problem solving, debug code and understand the structure of programmes in order to identify and resolve issues

---

## Schema 

```sql
CREATE TABLE IF NOT EXISTS users (
  id INTEGER PRIMARY KEY AUTOINCREMENT,
  email TEXT UNIQUE,
  hash TEXT,
  created_at DATETIME DEFAULT CURRENT_TIMESTAMP
);

CREATE TABLE IF NOT EXISTS sessions (
  id TEXT PRIMARY KEY,
  user_id INTEGER REFERENCES users(id),
  expires_at DATETIME NOT NULL,
  created_at DATETIME DEFAULT CURRENT_TIMESTAMP
);

CREATE TABLE IF NOT EXISTS events (
  id INTEGER PRIMARY KEY AUTOINCREMENT,
  title TEXT,
  content TEXT,
  event_date DATETIME,
  event_address TEXT
  user_id INTEGER REFERENCES users(id)
    
```

---

## Kanban Board: 



---

# Design


---

## DevOps

- [x] Got continuous deployment to Fly.io 

---

## Challenges

-3party package named express-validator (Konstantina)




## Questions?
