Skip to content

jinook929/_flatiron_project4

Repository files navigation

WeBoard JS Single Page App

by Jinook Jung


How To Set Up the App

  1. This app works best with Ruby 2.6.1 & Rails 6.1.3.1.

  2. Visit my Github repository and clone the code to your local directory:

git clone https://github.com/jinook929/_flatiron_project4.git.

  1. Enter into the _flatiron_project4/_flatiron_project4_backend folder: cd _flatiron_project4/_flatiron_project4_backend.
  2. Execute bundle install and run rails s in terminal.
  3. In a new terminal, move to the directory, _flatiron_project4/_flatiron_project4_frontend folder: cd _flatiron_project4/_flatiron_project4_frontend.
  4. Then, open the index.html in your browser (please avoid using live server).

How To Use the App

  1. You can either sign up for your own account or use the existing accounts to log in (5 users are pre-set: [email protected], [email protected], [email protected], [email protected], [email protected] [password for everyone is 123]).
  2. Before logging in, user can see all the notices/comments.
  3. Each notice has its category (please refer to category keys above notice display area).
  4. After logging in, you can create new notices/comments, and edit or delete your own notices.
  5. Keyword search is available for any user (both before and after logging in) via the search box on the navbar.
  6. There are a couple of Easter Eggs, so try to find them~^^√

Screen Captures

Landing Page

Landing Page

Signup Modal

Signup Modal

Login Modal

Login Modal

New Notice Modal

New Notice Modal

Notice Card (not owned)

Notice Card (not owned)

Notice Card (owned)

Notice Card (owned)

Notice Card (editing mode)

Notice Card (editing mode)

Search Function (found)

Search Function (found)

Search Function (not found)

Search Function (not found)

Data Structure

Tables

users

  t.string :email
  t.string :username
  t.string :password_digest
  ...

notices

  t.string :title
  t.string :description
  t.string :category
  t.integer :user_id
  t.datetime :updated_at
  ...

comments

  t.string :content
  t.integer :notice_id
  t.integer :user_id
  t.string :username
  ...

Model Associations & Validations

User

  has_many :notices, dependent: :destroy
  has_many :comments, through: :notices

  has_secure_password
  validates :email, presence: true
  validates_uniqueness_of :email, :case_sensitive => false

Notice

  belongs_to :user
  has_many :comments, dependent: :destroy

  validates_presence_of :title, :description, :category, :user_id

Comment

  belongs_to :notice
  belongs_to :user

  validates_presence_of :content, :user_id, :notice_id

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/jinook929/_flatiron_project4. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

Contributors

License & Copyright

© Jinook Jung

The app is available as open source under the terms of the MIT License.

About

Flatiron Project #4. JavaScript Project

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published