Giter Site home page Giter Site logo

tubecrush's People

Contributors

laravel-shift avatar troccoli avatar

Watchers

 avatar

tubecrush's Issues

Create a "top 5 lines" section

Put somewhere on the homepage, and possibly other pages too, a list of the top 5 lines, i.e. lines with the most posts. Make each item of the list clickable.

Create a post page

We need to have a unique URL for a single post, so that it can be shared.

if using the title as a unique tag for the post, think about how to handle changing the post's title.

Check the deployment script:

  • do we need to the non-interactive flag for the artisan commands?
  • do we need to run the seeder?
  • do we need to clear the caches before migrating and seeding?

Add a PostFactory

Use the faker package.

Create a seeder for test data with 25 posts.

Add ability to update a post

  • only users with the update-posts permission
  • same rules as for creating a new post
  • Update and Cancel button

On successful update return to the dashboard with a proper messsage

Link the Update button for each post in the dashboard to this screen

Replace laratrust permission package with spatie one

The only reason I chose the Laratrust package was because it has a UI already built-in.

However I don't really needa full UI, all I will need is the ability to assign a role to a user, which I'm hoping it will be easily done with Livewire/Tailwind.

Therefore I'd rather use a more widely used and well supported package as the Spatie one.

Create contact us page

It will be a simple form with the following fields:

  • your name (required|string|max:255)
  • your email address (requied|email)
  • your message (required|text|min:10)

Add tags to posts

This should be done with a package.

Need to decide how to handle the lines, as these are set and a post must have one and one only line.

Roles and permission

  • Install package - Spatie or Laratrust

  • Create two roles: Super Admin and Editor

  • Create seeder to add test users, with and withut roles

  • Build UI to manage user's role (only for Super Admin): Laratrust should come with its own, Spatie may need some research

Users

  • Disable registration
  • Allow registration for Super Admin only
  • Registration form will have name and email fields only
  • Assign a random password as defaults
  • Assign role Editor as default to new users
  • Send new users an email to reset their password

Add photo credit

We need to be able to credit the photo to whoever sent it and display it on the post.

Page for all post with a tag

A user may want to see all posts for a particular tag. The URl would be something like /tag/daddy The design would be the same as the homepage, with post in descending order by creation date, but with a header to say it's a list of posts for a particular tag.

We need the ability to click on any tags in any post and go that this page for that tag.

Media

This ticket is about using a package for managing the media assets, i.e. photos. Hence the checklist.

However, we should do some research first to see if there is another package than the one provided by Spatie that we could use instead

  • Spatie package
  • Look for free media management UI (may come with package)

Deployment investigation

This ticket is only about investigating where to deploy. The options are:

  • AWS (EC2 instance or Lambda)
  • Google Cloud (Compute Engine or Cloud Functions)
  • Digital Ocean or Linode

Cookies

Implement the cookies consent.

Page for all post on a line

A user may want to see all posts for a particular line. The URl would be something like /lines/circle-line The design would be the same as the homepage, with post in descending order by creation date, but with a header to say it's a list of posts for that line.

We need the ability to click on the line in any post and go that this page for that line.

We also want a new dropdown menu itme in the main nav bar, called Lines with all the lines.

Introduce CacheRepository for Posts

Posts are not going to change often but they are used a lot. So we should cache them as much as possible.

See this for an idea how to.

We shouldn't only cache the models but also things like how many posts in total, for a line or a tag. This way we can, foe example, disable the "Load More" button when we know there won't be any more.

Add a "this is me" button to a post

Add a "this is me" button to each post, on the home page, line pages, tag pages and single post page (after #89)

Clicking on the button will redirect the user to another page where they can fill in a form with:

  • the post id as a hidden field
  • their twitter, Facebook, instagram social media so that we can verify it's actually them
  • an email address so we can contact them to let me know what is happening
  • to option to remove the post or amend it
  • the twitter, Facebook or instagram social media they would like to add to the post

Validation:

  • the post id must be of an existing post (mandatory)
  • at least one social media for verification
  • a valid email address (mandatory)
  • whether to remove or amen the post (mandatory)
  • at least one social media for amendment (mandatory if they chose to amend the post)

By submitting:

  • create a new claim (#90)
  • send an email to all admins that a new claim has come in.
  • send an email to the claimant that we have received their claims

Initial installation

Wiki

  • Laravel 8

  • Laravel Jetstream (Livewire and TailwindCss)

  • preset authentication

  • publish all livewire and/or tailwind assets (we're going to use them)

  • set up basic phpunit and dusk test

  • set up github actions

Add commenting.

We could have a system where a person must include the email address, and then an email is sent to confirm the comment (which function as an email confirmation as well). This may result in the comment being automatically approved, or not.

In any case, I think we need a way to moderate the comments, even if they can be automatically approved, because the content may not be right.

We need a new role for this, Moderator, and new permissions, delete and approve at the very least.

Need to decide the permissions to assing to an Editor (ask Steve).

Add permissions for the Claim model

  • update claim
  • delete claim
  • view claim
  • reopen claim

Note that there is no 'create claim' permission as no one is allowed to create a claim. Claims are only created automatically by the system.

Fonts

  • Roboto as default
  • Actor for post's title
  • Monserrat for post's text

Static pages

Add static pages for

  • About us
  • Photo guidelines
  • Legal
  • Photo removal
  • Press enquires

Add ability to delete a post

  • only users with delete-posts permission
  • create pop-up modal to ask for confirmation
  • the post will be softly deleted

Link the Delete button for each post in the dashboard to this action

Add social media to post

Since it will be possible for users to claim a post, then we should allow their social media to be displayed on the post (everywhere a post is shown).

Add the following fields to the posts table

  • claimant_facebook
  • claimant_twtter
  • claimant_instagram

Then show them on the post with the appropriate icon if available. Make them clickable.

Refactor test to not seed

Rather than seeding the DB with fake posts we should refactor the tests to only create the data they need when they need it.

Refactor Dusk test into Cypress

Dusk tests seem to be very unstable. They often fail for no reason, i.e. the screenshots prove the test should have passed. I think this is done to speed of the test against speed of the underlying browser.

This ticket is about rewriting the Dusk tests using Cypress instead, which has been, in my experience, much more reliable. Writing Cypress tests is not as straight-forward as writing Dusk tests (at least for a PHP developer) but the fact I will not have to re-run the GH Actions multiple time untile all test finally pass so I can merge a PR or deploy would be worth the effort.

It could also be enough to rewrite some of the more crucial tests, like the one for the CRUD operations on the posts.

Create permissions for posts

  • create 4 permissions to create-posts, view-posts, update-posts and delete-posts.
  • Editors can only create, view, and update posts
  • Viewing posts means they can see the list of posts in the dashboard

Error pages

  • build a customised 404 page (Not Found)
  • build a customised 403 page (Not Authorised)
  • build a customised 500 page (Server Error)
  • build a customised 503 page (Not Available)
  • build a customised generic error page

Wireframes

  • menu bar, with and without logged in user
  • footer
  • homepage
  • super admin dashboard
  • editor dashboard
  • Post form (create and update), with and without tags
  • Comment moderation

Add posts

The most important part of the site: posts.

Add model and test factory, test data seeder, dashboard CRUD and permissions, and change the homepage.

No need to have a page to display a single post, as it doesn't add any value.

Remove seeders and use migrations instead

Seeders should be used to create data for the staging site only, like posts and users. Data that will always have to be there, like for example role, permissions and lines, should be added with migrations.

Add ability to create a new post

  • only users with create-posts permission
  • title: required|max:255 (or whatever max length for the title is)
  • content: required|min:10|max:2000 (although the field is text it's good to have a limit)
  • author_id: the id of the user
  • Create and Cancel button

On successful creation return to the dashboard with a proper message

Link the Create button of the dashboard to this screen

Add lists of post to the dashboard:

  • the list is only available with the view-posts permission
  • 3 posts per page with infinite scrolling on mobile, 10 posts per page paginated on desktop
  • for each post show title, author, created_at
  • for each post show button to update (based on the update-posts permission) and delete (based on the delete-posts permission)
  • show a button to create a new post at the top (based on the create-posts permission)
  • The buttons don't do anything yet
  • Use a heroicons for the button and don't forget the aria- attributes

Add rating system.

@Tubecrush

We need to decide what kind of rating system you would like.

I have noticed that currently you have at least two: a 5-stars system and a thumbs up/down system. Which are basically what I could think of as a rating system. Scales from 1-10 are essentially the star system.

I would prefer the star system as I'm not sure what a thumbs-down would mean. Also, what would we do if a post as more thumbs-down than thumbs-up? We wouldn't remove it so, what would it mean?

Also, with a scale system (let's call it scale as it may not be with stars and thye may not be just 5) we could also have some fun. For example, instead of stars we could use emoji to represent ice, cold, cool, warm, hot, fire, vulcano (1-7 scale). Or maybe chillis like Nando's does (I'm sure you're familiar with Nando's)

Apart from that, which can come later, it's just design, we also need to decide how many times a user can vote for a post. As we don't have logged in user we cannot track if someone has already voted for a post. I would recommend coming up with a system to prevent a user to repeatedly voting for the same post as that would screw the results.

I don't know if you have any idea, but I'm thinking of allowing a user to vote for a post once in a day. I don't mean the can only vote once in a day, but they cannot vote again for the same post in the same day. At the moment I'm thinking about using cookies, so someone could easily get around the restriction, but I don't think we care that much, do we?

So, please, have a think about all this and let me know what you think. Let's use this issue as a discussion. Once we come to an agreement I can do the work.

Add Post model

The fields are:

  • id increment
  • title string 255 (we may want a smaller length for display purposes)
  • content text
  • author_id unsigned bigint
  • created_at timestamp
  • updated_at timestamp
  • deleted_at timestamp

primary key id
index on created_at

foreign key author_id -> users.id

Add posts to the homepage

In the homepage, display the first 3 posts in descending created_at order.

Use a fixed image for all of them.

Create a word cloud for tags

This needs some thought:

  • where to put the cloud
  • whether to use all tags or only the onse with at least x posts
  • research a package to do it for you

Remove author from post

Do not show the author on the post as it's not useful information. Maybe move the date somewhere else too.

Import WordPress data

This about writing a command to import the data stored in the original WordPress database into the new one.

Things to import:

  • Posts
  • Tags, including linking them to the posts
  • Lines, including linking them to the posts
  • Photos, including linking them to the posts (although the actual photos will just need to be copied someone and their filename preserved)
  • Rating, including linking them to the posts (as the original site used at least two different rating system it may be possible we will lose some ratings)
  • Comments, including linking them to the posts

Create a Claim model

Create a new model to store info about users' request to claim a post.

The fields should be:

  • id
  • status (received, approved, rejected, in progress)
  • post_id
  • requested_action (remove, amend)
  • claimant_email
  • social_media_for_verification (json)
  • social_media_for_amendment (json)
  • created_at
  • updated_at
  • deleted_at

Only the social_media_for_amendment is nullable.

The status defaults to received

Update logo

The current logo used is the default one that comes with Jetstream. We should replace it with the one for TubeCrush, even if the quality of the logo is not the best.

Create the "Admin" role

This role is for admin work that an Editor is not supposed to do.

The Admin role will have all the permissions for and Editor, plus the following:

  • view claim
  • update claim
  • delete claim

Note that 'reopen claim' is not assigned to the Admin role (it is reserved for Super Admins)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.