Skip to content

Chareeef/CodeLog

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

253 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CodeLog: A Journaling Web Application for Software Engineers

Overview

CodeLog is a web application designed to help software engineers maintain a daily journaling habit. Users can log their daily progress, track their streaks, and interact with posts through comments and likes.

20240603_123108

Table of Contents

Features

  • User Authentication: Secure user registration and login with JWT authentication.

20240603_123139

  • Journaling: Log daily entries and edit or delete past entries.

20240603_123335

  • Streak Tracking: Track current and longest streaks with time-based logic.

20240603_123420

  • Comments and Likes: Interact with posts through comments and likes.

20240603_123516

Technologies Used

  • Frontend: React.js
  • Backend: Flask, Gunicorn
  • Database: MongoDB, Redis
  • Deployment: DigitalOcean, Nginx, Let's Encrypt (SSL)
  • Other: JWT for authentication, Systemd for process management

Installation

Prerequisites

  • Node.js and npm
  • Python and pip
  • MongoDB
  • Redis
  • DigitalOcean account (or another hosting service)

Clone the Repository

git clone https://github.com/yourusername/code-log.git
cd code-log

Backend Setup

  1. Create a virtual environment and install dependencies:

    python -m venv venv
    source venv/bin/activate
    pip install -r requirements.txt
  2. Configure environment variables: Create a .env file in the backend directory and set the required environment variables.

  3. Run the backend server:

    flask run

Frontend Setup

  1. Navigate to the frontend directory and install dependencies:

    cd frontend
    npm install
  2. Run the frontend server:

    npm start

API Endpoints

Authentication

  • POST /register: Create a new user.
  • POST /login: Authenticate a user and return JWT tokens.

User Management

  • PUT /me/update_infos: Update user information.
  • PUT /me/update_password: Update user password.
  • DELETE /me/delete_user: Delete user account.

Posts Management

  • POST /log: Log a new entry.
  • GET /feed/get_posts: Retrieve all public posts with optional pagination.
  • PUT /me/update_post: Edit a specific post.
  • DELETE /me/delete_post: Delete a specific post.

Streak Management

  • GET /me/streaks: Get current and longest streaks.

Deployment

Backend Deployment

  1. Set up Gunicorn and Systemd for process management.
  2. Configure Nginx as a reverse proxy.
  3. Deploy on a DigitalOcean server.

Frontend Deployment

  1. Build the React app:

    npm run build
  2. Deployed on the same DigitalOcean server as the backend.

SSL Certification

  • Use Let's Encrypt and Certbot to obtain and renew SSL certificates.

Domain Name

  • We purchased and configured "code-log.site" as our domain name on Namecheap.

License

This project is licensed under the MIT License.


Conclusion

CodeLog is more than just a journaling app; it's a tool designed to help software engineers stay organized, track their progress, and connect with their peers through shared experiences. From robust backend solutions to a sleek, user-friendly frontend, this project showcases the power of collaboration and modern web development technologies. We're proud of what we've built and excited to see how it can benefit the developers community!

Contributors

About

A Journaling app for Software Engineers

Resources

License

Stars

Watchers

Forks

Contributors