|
7 | 7 | - [x] Users can signup and create accounts |
8 | 8 | - [x] Users can login |
9 | 9 | - [x] Jwt auth is implemented |
10 | | -- [ ] Users can create posts |
11 | | -- [ ] Users can reply to posts |
| 10 | +- [x] Users can create posts |
| 11 | +- [ ] Users can reply to each other's posts |
12 | 12 | - [ ] Users can delete their posts. |
13 | 13 | - [ ] Users can edit their posts. |
14 | 14 | - [ ] Secure all user post routes with JWT auth. |
|
66 | 66 |
|
67 | 67 | ### Homepage |
68 | 68 |
|
69 | | -The homepage is the welcome page that contains a welcome message and links to the signup and login page. |
| 69 | +The homepage is the welcome page for the site that links to the signup and login page. |
70 | 70 | The route is located at `Get localhost:8080/`. |
71 | 71 |
|
72 | 72 |
|
73 | 73 | ### SignUp |
74 | 74 |
|
75 | | -The signup page is where you fill out a form to create an account. |
| 75 | +The signup page is where you fill out a form to create an account. |
76 | 76 | Its route method is `GET localhost:8080/signup`. If account creation fails the errors will be listed |
77 | 77 | in json format. On success the account is created in the database and your logged into the posts page. |
78 | 78 |
|
79 | | -### View |
80 | 79 |
|
81 | | -Once the user fills out the the loginForm and clicks submit |
82 | | -a post route with that form data `POST localhost:8080/view` |
83 | | -creates the user's account. If there is any error with any of the fields |
84 | | -the fields and their errors are returned in json format. |
| 80 | +### View |
85 | 81 |
|
86 | | -### LoginForm |
| 82 | +After submitting an account for creation from the signup route a |
| 83 | +http request to `Post localhost:8080/view` creates the account on the database. |
| 84 | +After successfully creating their account, the user automatically logged in |
| 85 | +and is redirected to their posts route. |
87 | 86 |
|
88 | | -The loginForm is a form page where users login; the request is at `GET` `localhost:8080/loginForm`. |
89 | | -Once submitted, its authenticated at post route `Post` `localhost:8080/view`. |
| 87 | +### Login |
90 | 88 |
|
| 89 | +Where the user logs in; the request is at `GET` `localhost:8080/login`. |
| 90 | +Once submitted, its authenticated at post route `Post` `localhost:8080/posts`. |
91 | 91 |
|
92 | | -### Posts wip |
93 | 92 |
|
94 | | -The Post page using the route `POST localhost:8080/posts` given the login form data |
95 | | -authenticates the user's credentials. The Posts page is the where the users can view |
96 | | -and modify their posts. This page is still a work in progress. |
| 93 | +### Posts |
| 94 | + |
| 95 | +After login, the user will have access to their Posts page which is their homepage. |
| 96 | +The route is located at `localhost:8080/posts`. The Posts page is the where the users |
| 97 | +can view and submit posts. New posts are submitted via `POST localhost:8080`. |
| 98 | +Each Post contains the user's username, the date the post was submitted, and |
| 99 | +the post's body. The max size of the post's body is 350 characters. |
| 100 | + |
| 101 | +#### Current Progress |
| 102 | + |
| 103 | +As for what can be done with posts, currently the user |
| 104 | +can only submit new posts to themselves, not replies to other users. |
| 105 | +Posts also, can't be edited or deleted. Being able to make replies |
| 106 | +and delete or edit your posts are wips. |
| 107 | + |
0 commit comments