# Features — siliconreact

Evidence date: 2026-10-03. Source: `git@bitbucket.org:overdrive/siliconreact.git`, `master` at `96fd3b0` (2023-03-24).

"Current" means present on `master` at that commit. It does not mean the feature is deployed or finished.

## Current

| Feature | Route or location | Status in the code |
|---|---|---|
| Sign-in form as the site root | `pages/index.tsx` renders `pages/auth/login.tsx` | Works as a form. Accepts only the hardcoded pair in `pages/api/auth/[...nextauth].ts` |
| Sign-in form by direct URL | `/auth/login` → `pages/auth/login.tsx` | Same component as `/` |
| Client-side login validation | `lib/validate.ts` | Email required and pattern-checked. Password required and rejected if it contains a space. Errors change the border colour only |
| Credentials session | `pages/api/auth/[...nextauth].ts`, `SessionProvider` in `pages/_app.tsx` | JWT strategy. Fixed user object on success. `pages.signIn` is `/auth/login/` |
| Remember me checkbox | `pages/auth/login.tsx` | Visible. Not sent to `signIn` |
| Authenticated home | `/home` → `pages/home/index.tsx` | Welcome text plus Sign Out. Unauthenticated visitors are sent to `/` |
| Sign out | `signOut()` in `pages/home/index.tsx` | Button only. No callback URL argument |
| Users placeholder | `/users` → `pages/users/index.tsx` | Welcome text when authenticated. Commit `dc7d03c` says "still to populate". No link to this route |
| Sign-up screen | `/signup` → `pages/signup/index.tsx` | Fields for first name, last name, email, password. Submit logs empty Formik state. No account is created |
| Forgot-password screen | `/forgotpassword` → `pages/forgotpassword/index.tsx` | Email field and Reset Password button. Click logs `sent email` |
| Landing screen | `/landing` → `pages/landing/index.tsx` | Logo, "Welcome To Silicon React", Log In button to `/auth/login`. Not used by `/` |
| Silicon logo | `public/assets/images/SiliconLogo.png` | Used by login, signup, and landing via `next/image` |
| Copyright line | Inline `CopyRight` in login, signup, and forgot-password | Links to `https://www.overdrive.co.za/` and shows the current year |
| MUI app shell | `pages/_app.tsx`, `pages/_document.tsx`, `src/theme.ts`, `src/createEmotionCache.ts` | Theme provider, CSS baseline, Emotion SSR cache, English document, Roboto stylesheet, theme colour meta |
| Button wrapper | `components/button/index.tsx` | MUI `Button` and `ButtonGroup`. Optional `evtId` passed into `onClick`. Default variant `contained` |
| Sample API | `GET` (any method) `/api/hello` → `pages/api/hello.ts` | Returns `{ name: "John Doe" }` with status 200. No auth |
| SonarQube scan on master | `bitbucket-pipelines.yml`, `sonar-project.properties` | Pipeline step only. Does not build or test the app |
| Create-next-app leftovers | `README.md`, `styles/globals.css`, `styles/Home.module.css`, `public/next.svg`, `public/thirteen.svg`, `public/vercel.svg` | README and CSS are unused by the pages. SVGs are the template files |

## Completed in history, then changed

| Feature | When | What changed |
|---|---|---|
| Landing page as `/` | Added `4018f2b` (2023-03-09) | `96fd3b0` (2023-03-24) commented out that import. `/` now renders login. `/landing` still exists |
| Login at `/login` | `pages/login/index.tsx` from `4018f2b` | Removed in `dc7d03c` (2023-03-14). Replaced by `pages/auth/login.tsx` |
| Favicon href `/static/favicon.ico` | Earlier `_document.tsx` | `96fd3b0` changed the href to `/favicon.ico`, which matches `public/favicon.ico` |
| Unauthenticated redirect target `/auth/login` | Home and users before `96fd3b0` | Now `Router.replace("/")` |
| Back links to `/auth/login` | Signup and forgot-password before `96fd3b0` | Now link to `/` |
| Hardcoded password literal | Present since `30f78f5` | `96fd3b0` replaced the literal with a different literal. The value is not recorded here |

## Planned

The only explicit unfinished note is the commit message on `dc7d03c`: the users page is "still to populate". No issue tracker, TODO comment, or design for that population is in the tree.

Signup and forgot-password look like intended features from their labels. The code does not record a plan for persistence or email. Treat completion of those flows as **Unknown / Requires Confirmation**, not as a scheduled feature.

## In development

Nothing in the git history is marked in progress after 2023-03-24. The unfinished users page and the non-functional signup and reset screens are incomplete, not an active branch of work.

## Deprecated or removed

| Item | Evidence |
|---|---|
| Route `/login` | File `pages/login/index.tsx` deleted in `dc7d03c` |
| Landing page as the default route | Import commented out in `pages/index.tsx` at `96fd3b0`. The component file remains |
| `src/Link.tsx` | MUI example link. Nothing in `pages/` or `components/` imports it. It imports `clsx`, which is not a declared dependency |

## Not features of this product

- The README sections "Learn More" and "Deploy on Vercel" are template text. No Vercel project file is committed (`.vercel` is gitignored).
- `next/font` and the Inter font are named only in the README.
- Palette overrides in `src/theme.ts` are commented out. The theme is MUI's default `createTheme({})`.

## Recently changed

The latest commit (`96fd3b0`, 2023-03-24) is the routing pass described above, plus a change to the hardcoded password literal and removal of a `console.log(formik.errors)` on the login page. No later change exists on `master`.
