Create webapp called CodeFellowship that allows people learning to code to connect with each other and support each other on their coding journeys.
- Have a modern web browser like Google Chrome (Firefox or Edge)
- Install Java (recommend installing JDK 17+)
- Install PostgresQL (a latest, stable, supported version will do) and create a database.
- Install Gradle v.7.4.2
- Clone this repo.
- Update application.properties with information listed in Application Properties section
- At the terminal in the repo root folder, execute:
gradle bootRun
- Gradle will install dependencies listed in application properties.
- Launch a browser and point the URL bar to 'localhost:8080'
- You will need to register yourself as a user using a 'Register' link.
- Once registered, you can login, visit the profile page (slash route), or logout.
File Application.Properties is not included in this repo for various reasons.
You will need to create one and put it in the './resources/templates' directory before building or running this webapp successfully.
spring.datasource.url=jdbc:postgresql://localhost:5432/your_database_name
spring.datasource.username=your_postgres_admin_username
spring.datasource.password=your_postgres_admin_password
spring.jpa.hibernate.ddl-auto=update
spring.jpa.generate-ddl=true
spring.mvc.hiddenmethod.filter.enabled=true
server.error.whitelabel.enabled=false
Note: This application.properties template code has been updated to the requirements in Wednesday's project work.
Current state: I am in the process of building this application to the standards of Lab 17.
'X' or checked list items below are completed but may not have been tested, with the exception of "default profile picture" which was implemented and tested yesterday.
'~' or tilde list items are partially implemented.
The WebApp will build and run without error.
There will be little (if any) live indication that today's feature implementations are enabled.
-
Allow users to log in to CodeFellowship, view user profiles, and create posts.
-
Upon logging in, users should be taken to a /myprofile route that displays their information.
-
This should include a default profile picture, which is the same for every user, and their basic information from ApplicationUser.
-
[~] The site should have a page which allows viewing the data about a single ApplicationUser, at a route like /users/{id}.
-
This should include a default profile picture, which is the same for every user, and their basic information.
-
Continue to ensure that your homepage, login, and registration routes are accessible to non-logged in users. All other routes should be limited to logged-in users.
-
Add a Post entity to your app.
-
A Post has a body and a createdAt timestamp.
-
A logged-in user should be able to create a Post, and a post should belong to the user that created it. Hint: This is a relationship between two pieces of data
-
A user’s posts should be visible on their profile page.
-
The site should use reusable templates for its information. (At a minimum, it should have one Thymeleaf fragment that is used on multiple pages.)
-
[~] The site should have a non-whitelabel error handling page that lets the user know, at minimum, the error code and a brief message about what went wrong.
- build a webapp that allows users to log into CodeFellowship
- single login page
- login page has link to signup page
- ApplicationUser has username, password (hashed), firstName, lastName, dateOfBirth, and bio
- ApplicationUser fields can all be configured via the signup page
- User can create an ApplicationUser on the signup page
- Controller is 'Autowired' to manage password encoding
- Follow steps using the Spring Security Cheat Sheet
- Site should have a homepage as "slash route" aka "/" that contains basic information about the site
- Slash route should have links to login and signup
- Slash route should have link to logout if user is already logged in
- User is redirected to home/login page when they logout
- When user is logged in the app should display the username on every page
- Ensure homepage, login, and registration routes are accessible to non-logged-in users
- Site should be well styled and attractive
- Site should use templates to display information
- Ensure user registration also logs users into your app automatically
Ben Mills Alex White Roger Reyes
...for their assistance in helping me resolve various bugs along the way!