A simple note-taking web application built with Express.js, EJS, and PostgreSQL using the Sequelize ORM. The app supports multilingual interfaces (🇫🇷 / 🇺🇸), and allows users to create, edit, and delete notes stored in a PostgreSQL database.
- 🗃️ Create, edit, and delete notes
- 🖥️ Server-side rendered views using EJS
- 🌐 Multilingual support: French (fr-FR) and English (en-US)
- 📦 Dockerized PostgreSQL database
- 🔄 Language selection with persistent cookies
- 🔧 Sequelize ORM integration
Layer | Technology |
---|---|
Backend | Express.js |
View Engine | EJS |
ORM | Sequelize |
Database | PostgreSQL |
Translations | i18n-node |
Containerization | Docker Compose |
Unit Testing | Jest, Supertest |
.
├── src/
│ ├── app.js # Main Express app
│ ├── models/ # Sequelize models
│ ├── views/ # EJS templates
│ ├── routes/ # Express routes
│ ├── locales/ # i18n translation files
│ └── i18n.js # i18n setup
├── tests/
│ └── notes.test.js # unit tests for notes manipulations
├── Dockerfile # Node.js container setup
├── docker-compose.yml # App + PostgreSQL services
└── package.json
git clone https://github.com/T0my-commits/Notebook-Express-Demo
cd notebook_expressjs
If not using Docker, you'll need to create a .env
file with your DB credentials:
DB_NAME=notebook
DB_USER=postgres
DB_PASSWORD=yourpassword
DB_HOST=localhost
DB_PORT=5432
If you want to run unit tests, do:
docker compose -f docker-compose.test.yml up --build --abort-on-container-exit --remove-orphans
docker compose up --build --remove-orphans
This will:
- Build the Node.js app
- Start a PostgreSQL container
- Bind app to
http://localhost:3000
Your data will be persisted using Docker volumes, except in the test environment, where the storage is temporary
You can change the app language via:
GET /lang/en
GET /lang/fr
The choice is stored in a cookie named lang
.
- Go to http://localhost:3000
- Add a new note using the form
- Click a note title to edit or delete it
- Switch language using
/lang/en
or/lang/fr
- Add user authentication
- Add support for rich text
- Implement search and tagging
This project was created for demonstration purposes only.
This repository does not yet accept merge requests and exists for now for skills demonstration purposes only.