| Requirement | Minimum Version |
|---|---|
| Node.js | v18.0+ |
| npm | v9.0+ |
| MongoDB | v6.0+ |
npm install| Package | Purpose |
|---|---|
express |
HTTP server |
mongoose |
MongoDB ODM |
argon2 |
Password hashing (argon2id) |
zod |
Request validation |
helmet |
Security headers |
express-rate-limit |
Rate limiting |
cookie-parser |
Cookie handling |
dotenv |
Environment variables |
ua-parser-js |
Device detection |
Local MongoDB:
# Start MongoDB (varies by OS)
mongod --dbname modularauthMongoDB Atlas:
Use your Atlas connection string in .env:
MONGODB_URI=mongodb+srv://user:pass@cluster.mongodb.net/modularauth
Copy .env.example to .env:
cp .env.example .envSee Environment Variables for all options.