Except the login page, I don't think any other resource should be made public.
Hence, the only public page is "Login"! (duh!).
Purpose of the admin panel is to allow a user (an Admin user, that is) to be able to manage (add/update/remove/archive/disable) Kuotes (for the Kuotes App).
Considering the above set of functionality, and the fact that basic searching, sorting, pagination etc would be required as well, following is the (high level) list of features/sections/pages that is expected to be developed (this week?, today?):
- Dashboard (high level stats for admin)
- Total number of kuotes
- Active/Inactive (disabled + archived)
- Without photo?
- User generated (not yet?)
- List of kuotes
- List view : Author, Kuote, Date added, status, owner (Admin / User)
- Search (Author name, Kuote text, Date added, status)
- Pagination (Previous, 1-n, Next)
- Sorting (Author, Date, Status)
- Edit
- Delete
- View
- Manage Authors
- Name
- Photo (optional)
- Add new Kuote
- Select Author name (select dropdown, and if not found then input field)
- Add Kuote
- Add Photo (optional)
- Custom date-added (optional)
- Status (optional, defaults to
Active)
- Owner (optional, defaults to
Admin)
- Edit Kuote
- All of the
Add new Kuote features/options
- Delete Kuote
- Soft delete (change
status to Delete in DB, and set a deleted_at timestamp)
- All queries in the application to exclude all kuotes with
deleted_at status (need to see how best to manage this, or at each request method)
- Logout (!!)
Future features to be added:
- Allow users to login and perform actions (akin to the Admin ones above) for their own kuotes (added from App or from Web)
- Generate a
Pull Request of sort to Admin to include their Kuote as Public kuote (generated personally or referring an existing Kuote)
- Photo view in Admin and User sections to allow setting a default photo against a Kuote (allowing app-users to be able to customise it, but still have a default one)
That's it about the features and now moving towards the DB structure.
Table/Columns:
- Users
- ID (Numeric?)
- Name
- Email
- Password
- Role (defaults to Owner/Admin for Kuotes)
- Email verified at
- Status (or Active perhaps?)
- Created
- User Logins
- ID
- User ID
- Login status (logged in successfully or not)
- Consecutive attempts (before logging in successfully)
- IP address (In either case)
- Browser/Meta info (Log all server info available with request)
- Created
- Authors
- ID
- Name
- Photo
- Created
- Status
- Kuotes
- ID
- Author ID
- Kuote
- Date Added
- Status
- Deleted At (defaults to null)
- Owner (Defaults to null/0, for Admin/Kuotes)
- Photo
- Created
Looks like these 4 tables should be fine/enough. If required then more info would be added.
This will be deployed to GCP at (probably): kuotes-admin.konnector.dev or kuotes.konnector.dev or even kuotes.konnector.dev/admin