Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Secure Notes

A Vite frontend and Express/TypeScript API for user notes, authentication, admin user management, and analytics.

Requirements

  • Node.js 20 or later
  • Docker Desktop (only for the local MongoDB option)
  • A MongoDB Atlas database (only for the hosted option)

Run locally with Docker MongoDB

  1. Start MongoDB:

    docker compose up -d
  2. Create backend/.env from backend/.env.example, then enable the Docker database:

    USE_DOCKER_MONGODB=true
    MONGODB_URI_DOCKER=mongodb://localhost:27017/secure-notes

    Set JWT_SECRET to a long random value. Keep CORS_ORIGIN=http://localhost:5173 for the Vite dev server.

  3. Create frontend/.env from frontend/.env.example:

    VITE_API_URL=http://localhost:5000
  4. In separate terminals, install and run both apps:

    cd backend
    npm install
    npm run dev
    cd frontend
    npm install
    npm run dev

Open the address printed by Vite, normally http://localhost:5173.

Stop the local database with docker compose down. Its data persists in the mongodb_data Docker volume.

Scripts

From backend:

npm run dev
npm run build
npm start

From frontend:

npm run dev
npm run build
npm run preview

About

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages