A geolocation-based platform for sharing and discovering posts tied to places around you. It's a social media app where users share updates, memes, and media to friends in their area!
DATABASE_URL=postgresql://postgres:password@localhost:5432/postgres
PORT=8080
Update the url according to your database name and password. Additionally, copy and place the .env file in backend/, backend/testing/backend, and backend/testing/database.
- Make sure you have PostgreSQL installed and in your path for linux/mac/windows
- Create all the PostgreSQL tables outlined later in this readme
- Put the .env file in the three locations to run the web app and test accordingly
cd backendgo build -o ./server.exe ./src./server.exe
cd frontendnpm installnpm run dev
cd backend/testing/backendgo test .cd backend/testing/databasego test .
cd frontendnpm test
cd frontendnpx cypress open- Select test to run in the GUI
CREATE TABLE users (
id SERIAL PRIMARY KEY,
username VARCHAR(50) UNIQUE NOT NULL,
password_hash TEXT NOT NULL,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);CREATE TABLE posts (
id SERIAL PRIMARY KEY,
user_id INT NOT NULL,
content TEXT NOT NULL,
latitude FLOAT NOT NULL,
longitude FLOAT NOT NULL,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
file_name VARCHAR(255) NOT NULL DEFAULT '',
like_count INT DEFAULT 0,
FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE
);CREATE TABLE post_likes (
post_id INT REFERENCES posts(id) ON DELETE CASCADE,
user_id INT REFERENCES users(id) ON DELETE CASCADE,
PRIMARY KEY (post_id, user_id)
);CREATE TABLE comments (
id SERIAL PRIMARY KEY,
post_id INTEGER REFERENCES posts(id) ON DELETE CASCADE,
user_id INTEGER REFERENCES users(id) ON DELETE CASCADE,
parent_id INTEGER REFERENCES comments(id) ON DELETE CASCADE,
content TEXT NOT NULL,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);CREATE TABLE messages (
id SERIAL PRIMARY KEY,
sender_id INT REFERENCES users(id) ON DELETE CASCADE,
receiver_id INT REFERENCES users(id) ON DELETE CASCADE,
content TEXT NOT NULL,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);- Boris Russanov
- Bryan Etzine
- Kevin Wagner

