Account Service
- JavaScript 72%
- PHP 23.8%
- HTML 2.8%
- EJS 1.4%
| api | ||
| db | ||
| ui | ||
| .gitignore | ||
| db-schema.png | ||
| README.md | ||
Accounts
Setup a simple full-stack PHP & MySQL website that allows you to create and manage accounts password, email, and 2FA.
- Create account for user name and email
- Reduce spam accounts via CAPTCHA
- Verify email
- Email template
- Validate alpha-numeric account name between 3-64 characters
- Validate email up to 64 characters
- Validate password 8-64 characters with upper case, lower case, symbol, and number
- Prevent using same password as prior 5 passwords
- Salt and hash passwords
- Change email only after new email is verified
- Resend verification email
- Reset password
- Add & Remove two-factor authentication
- Enforce old passwords to change
- Localization (nice to have...)
Structure
- ui: The front-end code that talks to the api.
- api: The back-end code to talk to the MySQL database.
- Tested on MySQL
@@version5.6.41-84.1 - All communication is via JSON.
- JSON Object always has
successkey to indicate if there was a problem. - JSON Errors will always have a
messagekey to explain the reason - JSON Success will have a
datakey containing any data returned
- Tested on MySQL
- api/test: simple manual tests against api
- api/chron: cron jobs to clean up the database for failed password resets and email verification
- db/build: database scripts to run in the order listed
- named with unix timestamps to list in proper order of execution
- format
[timestamp]-[TABLE|FUNC|PROC]-[name].sql - Document table, columns, and indexes
