A website named "Corporategirl" where you can read secrets about companies - inspired by gossipgirl, fishbowl and glassdoor. A user can create an account or sign-in to post and delete a secret they know about the company. For example, an employee at facebook could leak that Mark Zuckerberg didn't actually think of Facebook himself, he actually discussed the idea with the Wisconsin brothers (according to the social network).
PLEASE NOTE: The add secret and delete functions do not currently work...We're working on it!
Make sure you have Git and Node (v18) installed.
-
Clone this repo and cd into the directory
-
Run
npm install
to install all the dependencies -
Run
npm run seed
to create the database. Runnpm run seed-win
if using Windows. -
Run
npm run dev
to start the server. Runnpm run dev-win
if using Windows.
This uses the nodemon library to auto-restart the server when you save changes.
We currently have no tests written
- As an invested user I want to create an account that I can sign in with, to add and read secrets about different companies.
- As a cheeky user I want to post a secret about a company, and be able to delete it if I am the same logged in user.
- As a curious user I want to see other people's secrets.
Stretch goal:
- As an impatient user, I want to be able to read about a specific company using a drop down box.
This is how we envisioned Corporategirl would look when the user is logged in and can enjoy the full capabilities. Here is how we evisioned it would look when the user has not yet signed up or logged in.
Schema Code
BEGIN;
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 secrets (
id INTEGER PRIMARY KEY AUTOINCREMENT,
title TEXT,
content TEXT,
user_id INTEGER REFERENCES users(id),
company_id INTEGER REFERENCES companies(id),
created_at DATETIME DEFAULT CURRENT_TIMESTAMP
);
CREATE TABLE IF NOT EXISTS companies(
id INTEGER PRIMARY KEY AUTOINCREMENT,
name TEXT NOT NULL
);
COMMIT;
- Forms for users to sign up and log in
- A form for users to submit data only accessible to logged in users
- A page showing all the data
- A way for logged in users to delete their own data
- Semantic form elements with correctly associated labels
- A SQLite database
- Hidden environment variables (i.e. not on GitHub)
- Tests for all routes
- A user page that shows everything posted by a single user
- GitHub Actions CI setup to run your tests when you push