Giter Site home page Giter Site logo

ocp6's Introduction

Snowtricks

SymfonyInsight

This project is a community website exercise for the PHP course at OpenClassrooms.
It is not meant to be used in production nor is it meant to be a showcase.

This repository is primarily a way of sharing code with the tutor.

Installation

This project uses Composer with PHP >= 8.1.

Configure your database and email server in a .env.local file at the root of the project.
Copy a DATABASE_URL line from the .env file and modify it to fit your configuration.
Copy a MAILER_DSN line from the .env file and modify it to fit your configuration.

Clone and install the project.

# Clone the repository
git clone https://github.com/scoopandrun/ocp6
cd ocp6

# Install the dependencies
composer install

# Create your database
# Don't forget to configure 'DATABASE_URL' in your .env.local file with your local database information
php bin/console doctrine:database:create

# Execute the migrations
php bin/console doctrine:migrations:migrate

# (Recommended) Load the fixtures to get a starting data set.
# You can update the initial users information in the User data fixture.
# This downloads pictures from the Internet, so it may take some time to complete.
php bin/console doctrine:fixtures:load

# Launch the messenger consumer (async transport for email messages)
# Don't forget to configure 'MAILER_DSN' in your .env.local file with your local email server information
php bin/console messenger:consume async

ocp6's People

Contributors

scoopandrun avatar

Watchers

 avatar

ocp6's Issues

Add multiple sizes to images

When a user uploads an image, multiple sizes (thumbnail, small, medium, large) should be saved along the original file. This would benefit visitors who then would have to fetch full size images when only a small version of them is needed.

User is logged out when validating their email address

The user is logged out when clicking the link to validate their email address.

This is most probably due to the fact that the user information has changed in the database so Symfony automatically logs out for security reasons.

Create the trick view page

The page should show :

  • the trick's name
  • a main picture (or a graceful fallback)
  • its description
  • its category
  • pictures
  • embedded videos
  • #13

On mobile, the media should be hidden by default and a "See media" button should be shown instead.

Estimated time: 1 day

App bases

Lay the foundations of the application.

  • Create Symfony app
  • Create database structure
  • Add webmanifest
  • Add robots.txt
  • Add favicon

Estimated time: 2 days

Create the account activation email and confirmation page

When a new user signs up, an email is sent to ask the user to activate their account.
The email contains a link to be clicked to activate the account.
The activation page must confirm to the user that their account has been activated and they can log in with their credentials.

Estimated time: 1 day

Create the trick creation/edit page

The page should include a form that takes :

  • the trick's name
  • its description
  • its category
  • pictures for illustrations
  • videos (links) to embed in the page

It should also allow to chose which picture (if any) is the main picture.

Estimated time: 3 days

Create home page

The home page is public.
It must contain a hero header at the top, and it must display all the tricks (paginated or "endless loading").

The base layout must include a navigation bar at the top (desktop) or the bottom (mobile).

Estimated time: 2 days

Create the login page

The only required login method is email + password.

A "Password forgotten?" link must be available.

Estimated time: 1 day

Front-end: fix media list overflow issue

On the trick view page, the media list should be centered until the list is too long to fit in the container.
At that point, it should continue growing to the right with a horizontal scrolling bar.
The first item should be on the left of the screen.

Bug: some URLs are corrupted

Some URLs are hard coded instead of being generated, causing broken links when the path is changed.

Emails and the link to send a verification email are affected.

User: add the possibility to delete the account

A user should be able to delete their account from the user account page.

All mentions of the user's username should then show "Account deleted" throughout the application.

It should not be possible to recover a deleted account.

A user should be able to create a new account with the same email address and username as the previously deleted one. However, this new account should not be linked in any way to the deleted one.

Create the reset password email and page

The login page must show a "Password forgotten?" link to allow users to reset their password.

The first-stage password reset page should ask for an email address.
In case the email address is known the the database, an email must be sent to the address.
The email should contains a link to a reset page.

On the second-stage password reset page, the form should ask for a new password and password confirmation.

When the password is reset, the user is redirected to the home page, not logged in.

Estimated time: 1 day

User: add a profile picture

The user must be able to add a profile picture.

This profile picture must be displayed for each comment of the user.

Bug: Comment buttons are visible to everyone

Everyone can see the "edit" and "delete" buttons for comment where the author has deleted their account.

Although permissions are checked when clicking the buttons (thus nobody can truly edit nor delete these "anonymous" comments), the buttons must be hidden.

Check file size on upload

When a user uploads a file, the file size should first be checked in the client (for the user's convenience) and on the server (for security).

Create the discussion area

Create a discussion area on the trick's page.

All visitors must be able to see the discussion, but only connected users can post comments.

Add replies to comments

Users who are eligible to posting comments should be able to reply to comments.

Replies would be shown below the original comment in chronological order to allow for a easy conversation read.

Create the signup page

The form should ask for:

  • name
  • email
  • password

An account activation email must be automatically sent when a user signs up.
The account cannot be logged into before it is activated.

Estimated time: 1 day

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.