Skip to content

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

Future Messages

Write to your future self, lock the message, and open it only when the right day arrives.

Future Messages is a full-stack MVP for creating time-locked personal messages with authentication, a private dashboard, and scheduled unlock dates.

The repository contains:

  • client: a React + Vite frontend
  • server: an Express + MongoDB API

The current UI copy is mostly in Portuguese, while this README is written in English for GitHub.

Features

  • User registration and login with JWT authentication
  • Protected dashboard for authenticated users
  • Create future messages with a scheduled delivery date
  • Locked messages stay hidden until the unlock date is reached
  • View unlocked messages and track pending ones
  • Edit or delete messages only while they are still locked
  • Health check endpoint for quick backend verification

Tech Stack

Frontend

  • React 19
  • Vite
  • React Router
  • Axios
  • Tailwind CSS 4

Backend

  • Node.js
  • Express 5
  • MongoDB + Mongoose
  • JWT authentication
  • bcryptjs

Project Structure

future-messages/
|-- client/
|   |-- src/
|   |-- public/
|   |-- .env.example
|   `-- package.json
|-- server/
|   |-- src/
|   |-- .env.example
|   `-- package.json
|-- PLAN.md
`-- README.md

Getting Started

1. Clone the repository

git clone <your-repo-url>
cd future-messages

2. Install dependencies

Install frontend dependencies:

cd client
npm install

Install backend dependencies:

cd ../server
npm install

Environment Variables

Client

Create client/.env from client/.env.example:

VITE_API_URL=http://localhost:5000/api

Server

Create server/.env from server/.env.example:

PORT=5000
MONGODB_URI=mongodb://127.0.0.1:27017/future-messages
JWT_SECRET=change-me
CLIENT_URL=http://localhost:5173

Running the App

Start the backend

cd server
npm run dev

The API will run on http://localhost:5000.

Start the frontend

Open a second terminal:

cd client
npm run dev

The app will run on http://localhost:5173.

API Overview

Auth routes

  • POST /api/auth/register
  • POST /api/auth/login
  • GET /api/auth/me

Message routes

  • GET /api/messages
  • POST /api/messages
  • GET /api/messages/:id
  • PUT /api/messages/:id
  • DELETE /api/messages/:id

Health check

  • GET /api/health

Development Notes

  • The frontend stores the JWT token in local storage.
  • Locked messages return without their body until the scheduled date is reached.
  • Unlocked messages cannot be edited or deleted.
  • The backend expects MongoDB to be available before the server starts.

Deployment Ideas

  • Frontend: Vercel, Netlify, or Cloudflare Pages
  • Backend: Render, Railway, Fly.io, or a VPS
  • Database: MongoDB Atlas

GitHub Upload Checklist

Before pushing to GitHub:

  • Make sure client/.env and server/.env are not committed
  • Keep node_modules and client/dist out of the repository
  • Review PLAN.md and .qodo/ if you do not want internal planning files online

License

Add the license that matches how you want to share the project.

About

A full-stack app for writing time-locked messages to your future self.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages