NSWI142: Preparation for Programming Test

The goal is to develop a simple web application for managing events. Users should be able to create, read, update, and delete (CRUD) events as well as register for the events. You must use assigned GitLab repository to develop your application. The application must be deployed at webik at {base-url}/, where {base-url} is https://webik.ms.mff.cuni.cz/~{username}/semestral-project.

User functional requirements

This section contains user functional requirements. The user requirements are provided by users not analysts. As a result, the user requirements leave room for an interpretation. Use your experience to fill in the details and build an application users would like to use.

The application is composed of the following screens:

Header

Every page must contain a header. The header consists of:

  • Logo or name of the project of your choice.
  • Navigation to the landing page.
  • Navigation to the event list page.

In addition, when the user is not logged in, the header must contain also:

  • A navigation to login page.

When the user is logged in, the header must contain also:

  • Name of the user as a navigation to the user detail page.
  • Navigation to the create an event page.
  • Navigation to the current users's events page.
  • A logout button or link.

Landing page

The page must be available at {base-url}/. It must contain:

  • List of 3 newest events. For each event, it must display:
    • Name of the event.
    • Start and end date.
    • Name of the organizer.
    • Navigation to the event detail.

List all events page

The page must be available at {base-url}/events. It must contain list of all events. For each event, the listing must display:

  • Name of the event.
  • Start and end date.
  • Name of the organizer.
  • Navigation to the event detail.

The event list must be paginated with page size being equal to 7.

Create an event page

The page must be available at {base-url}/events/new. The page must contain a form that allows users to register for the events. For each event, the user must be able to provide:

  • Name - string up to 64 characters.
  • Description - string up to 1024 characters.
  • Start date - must be in the future.
  • End date - equal or bigger then start date.
  • Hero image - user provided image.
  • List of workshops - The user can add one or more workshops. For each workshop, the user must be able to set a name.

An event detail page

The page must be available at {base-url}/events/{event-identifier}. It must contain:

  • Event name.
  • Event description.
  • Start and end date.
  • Hero image.
  • List of all workshops at the event.

If the user is not logged in, this is all the page contains.

If the user is the owner of the event, it contains a link to the update an event page.

If user is not an owner and is not registered for the event, it contains link to event registration.

If user is not an owner and is registered for the event, it contains button to cancel the registration.

Update an event page

The page must be available at {base-url}/events/{event-identifier}/edit. It is accessible only to the event owner. The page must allow the user to modify all properties of the event. In addition, the owner can also delete the event.

Register for an event page

The page must be available at {base-url}/events/{event-identifier}/register. It enables the user to register for an event and select which workshops, if any, they want to attend.

This page can also be used to update an existing registration for an event. In such case, the input fields are populated with user's provided data.

Register a new user page

The page must be available at {base-url}/register. It enables the user to create a new account. In order to create an account, the user must provide:

  • Full name.
  • E-mail address.

If a user with a given e-mail address already exists, the user is redirected to the login page instead of creating a new account.

Login page

The page must be available at {base-url}/login. In order to login, the user has to provide an e-mail address.

List current user's events

The page must be available at {base-url}/events/mine. It contains a list of all events the user is registered for. For each event, it must display:

  • Name.
  • Description.
  • Start and end date.
  • Hero image.
  • List of all workshops the user is registered for.

User detail page

The page must be available at {base-url}/settings. This page enables the user to change the user details with the exception of the e-mail.

In addition, the user can use this page to delete their account. Deleting the account also cancels all registrations.

Status pages

The application must utilize HTTP status codes to communicate client requests or server issues. Specifically, the application must implement status pages for:

  • 404 Not Found
  • 500 Internal Server Error

Each status page should provide a brief, user-friendly explanation of the issues and direct the user to the next action. For example, 403 may inform the user that they are not logged in and provide a link to the login page. If you have never seen an error page, you can draw inspiration from GitHub 404 page.

Non-functional requirements

This section contains non-functional requirements. The non-functional requirements are sometimes called quality requirements. They describe how the system performs its functions rather than what functions the system performs. They may also put constrain on how the system is implemented.

Data

Code style and repository

External resources

Any resources on the internet, namely StackOverflow, Github Copilot, or Chat GPT, can only be used to solve minor problems, not to solve the whole problem directly. Thus, searching/prompting for class and function implementations and architectural composition is forbidden. Searching for feature documentation, examples, and bugs is fine.

Although many tasks are solvable by today's AI, the restrictions ensure that you understand the core of web application development, which is necessary for more complex problems where skilled programmers are still needed. The rule of thumb is that you use AI, not the other way around. As a result, you must be able to fully explain, and provide reasoning, behind all of the code. Failure to do so will result in failing the test.

If you plan to employ any type of transpilation, like Typescript, let us know in advance, so we can specify the rules.

You must be able to demonstrate functionality of individual parts of your solution by providing examples which are not part of your source code.