Build a local news site where users can log in, post and read about local news and events:
The system should include the data for at least 10 valid news articles.
You are required to create the following accounts to allow the system to be tested. All accounts should have the password p455w0rd
:
user1
user2
admin
(only needed if the stage 2 functionality is attempted).
A home page tha should be visible even if a user
is not logged in. If the user
is logged in they should see an Add news link or button that takes the user to the Add News page where they can add a news article, this should include:
- The title.
- A photo uploaded from their computer.
- A detailed, multi-line news article that can be formatted using the markdown syntax.
As well as the data from the form, your database should also store the following data (without asking the user to enter it).
- The username of the person adding the article.
- The current date and time.
- The article status (set this to
new
).
To demonstrate this feature and to prove that the form works correctly you will need to show that the data is being persisted correctly, either by running a database query or an API call depending on the platform and technology you are using.
The Homepage should display summaries of all the news articles, each should show:
- The title.
- A thumbnail photo.
- The date (but not the time) added (with the most recent at the top).
Each news article should have a Details link or button that takes the user to a News Article screen. This should contain the full details of the news article, including:
- The title.
- The full-sized photo.
- The username of the author.
- The date added, but not the time.
- The multi-paragraph, formatted news article with any markdown replaced with html.
The intermediate tasks require you to make changes to the functionality:
- Any articles with a status of
new
should not be displayed in the news feed. - If an admin user logs in they should see an Authorise articles link or button that takes them to a screen that only lists the summaries of articles with a status of
new
. - Each of these articles should have an Authorise link or button. Clicking this sets the status to
authorised
and returns the admin user to the Authorise Articles screen. if there are no more articles to authorise they are returned to the home screen. - When an article is added, the database stores the current location as latitude and longitude.
- Articles on the home screen display their approximate distance from the person viewing (in Km) and are ordered with the nearest at the top.
In some assignment briefs you are given marks for the appropriate use of media and using sensors built into the user's device.
In some assignment briefs you are given marks for the appropriate use of sensors and sensor data. You should be implementing:
- When a news article is added it should be provided with a geo-location based on the location of the person adding the article.
- When the user views an article it should show the location.
- When the user is prompted to upload a photo they should be given the option of using the device camera (if available).
- The home screen should display a map showing the locations of each news item:
- Clicking on a pin should show a summary bubble showing the brief title and the person who wrote it.
- Clicking on this should send the viewer to the news item page.
In the requirements listed above you need to provide the user with the ability to upload photos. For the extra media marks you will need to expand this by:
- Providing the user with the choice of uploading photos, video clips or audio clips.
- Giving users the option to directly capture images, audio and video clips using the built-in camera and/or microphone if available.
There are lots of online RESTful APIs you can make use of when developing this system. You should consider: