Skip to content

Repository files navigation

Dev Flow

Dev Flow is an in-progress full-stack developer Q&A project built with Next.js, TypeScript, Auth.js, MongoDB, and Mongoose. It explores the complete path from responsive React interfaces and validated forms to authenticated server actions, relational-style document references, and transactional question writes.

Project status

This is a portfolio and learning project, not a production service. Authentication, question discovery, question creation, and owner-checked editing are implemented. Question detail, answers, voting, collections, community, jobs, and profile experiences are still incomplete or represented by placeholder routes.

No production users, traffic, performance results, or business outcomes are claimed.

Implemented scope

The current application includes credentials sign-up and sign-in, GitHub and Google provider integration through Auth.js callbacks, responsive authentication and navigation interfaces, light and dark themes, a question list with search and filters, validated question forms, authenticated creation, owner-only editing, and tag assignment.

Question and tag writes use a MongoDB transaction so the question, tag counters, and join documents are updated together. Search input is escaped before it becomes a regular expression, and exact tag matching treats user text as data rather than executable pattern syntax.

Account and user persistence is internal to the authentication flow. The project does not expose generic public account or user CRUD endpoints. Password hashes are excluded from Mongoose queries by default and selected explicitly only during credentials verification.

Request and data flow

React / Next.js interface
        |
        | validated form or authenticated action
        v
Next.js App Router + server actions
        |
        | session and ownership checks
        v
Mongoose models and transaction boundary
        |
        v
MongoDB replica set or Atlas cluster

The browser renders the product interface and submits validated form data. Server actions establish the authenticated session and enforce ownership before a write. Mongoose models define users, accounts, questions, tags, answers, votes, collections, and interactions. MongoDB transactions require a replica set or a compatible managed cluster.

Technology

  • Next.js 16 App Router, React 19, and TypeScript
  • Tailwind CSS with Radix and shadcn-style interface primitives
  • React Hook Form and Zod validation
  • Auth.js with credentials, GitHub, and Google providers
  • MongoDB and Mongoose
  • Vitest, ESLint, and GitHub Actions

Local setup

Dev Flow requires Node.js 20.9 or newer, npm, and a transaction-capable MongoDB deployment. A standalone local MongoDB process cannot run the transactional sign-up and question-write flows; use a local replica set or MongoDB Atlas.

git clone https://github.com/ahmed-elsayed-programmer/dev-flow.git
cd dev-flow
npm ci
cp .env.example .env.local
npm run dev

Set the values in .env.local before testing authentication or database-backed routes:

MONGODB_URL=mongodb://127.0.0.1:27017/dev-flow?replicaSet=rs0
AUTH_SECRET=replace-with-a-random-secret
AUTH_GITHUB_ID=replace-with-a-github-oauth-client-id
AUTH_GITHUB_SECRET=replace-with-a-github-oauth-client-secret
AUTH_GOOGLE_ID=replace-with-a-google-oauth-client-id
AUTH_GOOGLE_SECRET=replace-with-a-google-oauth-client-secret

Do not commit real credentials. The values in .env.example are placeholders.

Verification

The repository uses the same commands locally and in GitHub Actions:

npm run lint
npm run typecheck
npm test
npm run build
npm audit

The automated tests currently cover regular-expression escaping, exact tag matching, password-selection defaults, required identity fields, and the tag-counter schema contract. They do not replace database-backed integration or browser tests.

Known limitations

  • Question detail, answers, votes, collections, community, jobs, and profiles are not complete.
  • OAuth behavior requires real provider credentials and has not been covered by automated integration tests.
  • Transactional sign-up and question writes require a MongoDB replica set or Atlas.
  • The project is not currently presented as deployed or production-ready.
  • End-to-end browser tests and database-backed integration tests remain future work.

Next improvements

The next implementation milestones are completing the question detail and answer flow, adding vote and collection behavior, covering authentication and question writes with database-backed tests, and validating the primary user journeys in a browser test suite.

Author

Ahmed Elsayed is a Full-Stack Engineer working with Python/Django and React/Next.js.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages