Skip to content

whywhom/mammoth-mind-journal

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MindJournal 心灵日记

Here is your personal emotional safe space. Whether it’s joy, anxiety, sadness, anger, or confusion, you can pour out the thoughts and feelings you find hard to share with others. This is a completely safe and private place—there’s no need for any worries or hesitation. Just speak freely, and let your emotions find release here.

Full-Stack Mental Health & Emotional Journaling Application Monorepo

English | 中文说明

MindJournal

Your personal emotional safe space. Whether it’s joy, anxiety, sadness, anger, or confusion, you can pour out the thoughts and feelings you find hard to share with others. This is a completely safe and private place—there’s no need for any worries or hesitation. Just speak freely, and let your emotions find release here.


🛠 Tech Stack

Backend

  • Framework: NestJS (Node.js)
  • Database: PostgreSQL
  • Cache: Redis
  • Auth: Google OAuth
  • API Docs: Swagger (Available at /api/docs)

Frontend

  • Framework: Next.js 14 (App Router)
  • Styling: Tailwind CSS
  • Language: TypeScript

mindjournal/
├── backend/     # NestJS + PostgreSQL + Redis
├── frontend/    # Next.js 14 + Tailwind CSS
├── package.json # 根目录,一键启动
└── README.md

🚀 Quick Start

1 Install Dependencies

cd mindjournal
npm run install:all

2 Configure Environment Variables

# 后端
cp backend/.env.example backend/.env
# 编辑 backend/.env,填入数据库、AI、Google OAuth 配置

# 前端
cp frontend/.env.local.example frontend/.env.local
# 编辑 frontend/.env.local

3 Start Infrastructure (Docker)

cd backend
docker-compose up -d postgres redis
cd ..

If you prefer not to use Docker, you can also use a local PostgreSQL instance:

# Ubuntu Install PostgreSQL
sudo apt update
sudo apt install postgresql postgresql-contrib

# Run Application
sudo systemctl start postgresql
sudo systemctl enable postgresql

# Create Database and Set Password
sudo -u postgres psql

Run the following commands within the psql shell:

ALTER USER postgres WITH PASSWORD 'postgres';
CREATE DATABASE mindjournal;
\q

Then, verify your .env configuration:

DB_HOST=localhost
DB_PORT=5432
DB_USERNAME=postgres
DB_PASSWORD=postgres
DB_DATABASE=mindjournal

The same applies to Redis; as long as the local Redis service is running, you are good to go:

# Check if Redis is running
redis-cli ping
# If it returns "PONG", it is running normally.

# If it is not started (Ubuntu)
sudo systemctl start redis

4 Launch Frontend and Backend (One-Click)

npm run dev

MindJournal 心灵日记

这里是您的专属心情树洞。不论是喜悦、焦虑、悲伤、愤怒还是迷茫,您都可以将那些无法对人言说的心事倾诉在这里。这里绝对安全、私密,您不必有任何顾虑,只管倾吐,让情绪在这里释放。

Here is your personal emotional safe space. Whether it’s joy, anxiety, sadness, anger, or confusion, you can pour out the thoughts and feelings you find hard to share with others. This is a completely safe and private place—there’s no need for any worries or hesitation. Just speak freely, and let your emotions find release here.

全栈心理情绪日记应用 Monorepo

mindjournal/
├── backend/     # NestJS + PostgreSQL + Redis
├── frontend/    # Next.js 14 + Tailwind CSS
├── package.json # 根目录,一键启动
└── README.md

快速启动

第一步:安装依赖

cd mindjournal
npm run install:all

第二步:配置环境变量

# 后端
cp backend/.env.example backend/.env
# 编辑 backend/.env,填入数据库、AI、Google OAuth 配置

# 前端
cp frontend/.env.local.example frontend/.env.local
# 编辑 frontend/.env.local

第三步:启动数据库

cd backend
docker-compose up -d postgres redis
cd ..

如果不想装 Docker,也可以直接用本机 PostgreSQL:

# Ubuntu 安装 PostgreSQL
sudo apt update
sudo apt install postgresql postgresql-contrib

# 启动服务
sudo systemctl start postgresql
sudo systemctl enable postgresql

# 创建数据库和设置密码
sudo -u postgres psql

进入 psql 后执行:

ALTER USER postgres WITH PASSWORD 'postgres';
CREATE DATABASE mindjournal;
\q

然后确认 .env

DB_HOST=localhost
DB_PORT=5432
DB_USERNAME=postgres
DB_PASSWORD=postgres
DB_DATABASE=mindjournal

Redis 同理,只要本机 Redis 服务在运行就行:

# 检查 Redis 是否在跑
redis-cli ping
# 返回 PONG 就正常

# 如果没启动(Ubuntu)
sudo systemctl start redis

第四步:一键启动前后端

npm run dev

About

Whether it’s joy, anxiety, sadness, anger, or confusion, you can pour out the thoughts and feelings you find hard to share with others. This is a completely safe and private place—there’s no need for any worries or hesitation. Just speak freely, and let your emotions find release here.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages