This project is a simple web-based personal diary built with Flask and MongoDB. It allows users to create, view, and manage diary entries, with optional file and profile image uploads. This project is part of the MSIB LearningX Full Stack Web Development program.
- Create diary entries with a title and content
- Optional file upload for each entry
- Optional profile image upload for each entry
- View all diary entries in a list
- Data stored in MongoDB
- Python 3
- Flask
- MongoDB
- HTML/CSS (Jinja2 templates)
- dotenv (for environment variable management)
app.py # Main Flask application
requirements.txt # Python dependencies
start.sh # Shell script to start the app
static/ # Static files (uploaded files, images)
templates/
index.html # Main HTML template
- Python 3.x
- pip
- MongoDB (local or cloud instance)
- Clone this repository:
git clone https://github.com/MuhammadAlifBudiman/personal-diary.git cd personal-diary
- Install dependencies:
pip install -r requirements.txt
- Create a
.env
file in the project root with the following content:MONGODB_URI=<your-mongodb-uri> DB_NAME=<your-database-name>
- Start the Flask app:
python app.py # or ./start.sh
- Open your browser and go to
http://localhost:5000
- The homepage allows you to create new diary entries and view existing ones.
- Uploaded files and profile images are saved in the
static/
directory.
This project is for educational purposes as part of the MSIB LearningX Full Stack Web Development program.
- MSIB LearningX
- Flask and MongoDB documentation