Large is a platform where users can share diverse thoughts, read and write stories of any topic, follow certain topics of interest, as well as follow other users. It is inspired by the the social publishing platform Medium.
| Live Site | MVP Feature List | Database Schema | Frontend Routes | API Documentation | User Stories |
Large is built on Node JS, HTML, and CSS for its frontend, Express and Sequelize for its backend, and a PostgreSQL database.
- Clone this repository
git clone git@github.com:ethanchen7/Large.git
- Install dependencies
npm install
-
Create a .env file in the root direction based on the .env.example given.
-
Create a user in psql based on your .env DATABASE_URL app_name
psql -c "CREATE USER <username> PASSWORD '<password>' CREATEDB"
-
Create a database in psql based on your .env DATABASE_URL db_name.
-
Start your shell and migrate and seed the database.
npx dotenv sequelize db:migrate
npx dotenv sequelize db:seed:all
Users are able to clap and comment on a story without being redirected from the page. They are also able to edit their biography from their user profile page. This allows for a seamless reading and interactive experience.
Users are able to follow and unfollow other users. This involved associated User instances with other User instances in a self-joining association:
const columnMappingOne = {
// User -> User, through Follow as follower
through: "Follow",
otherKey: "followingId",
foreignKey: "followerId",
as: "followings",
};
const columnMappingTwo = {
// User -> User, through Follow as following
through: "Follow",
otherKey: "followerId",
foreignKey: "followingId",
as: "followers",
};
User.belongsToMany(models.User, columnMappingOne);
User.belongsToMany(models.User, columnMappingTwo);
Users are able to publish a story and tag with a topic of their choice. This feature deviates from a traditional form due to the modal pop up and publish buttons being outside of the form element.