A collaborative wall where people can share their thoughts, opinions, and experiences anonymously or with attribution. Whether you're venting about your day, sharing political views, or connecting with others, StickyThoughts provides a space for expression.
- ๐ Post thoughts anonymously or with your profile
- ๐ Secure authentication with Google OAuth
- ๐พ Media storage with Cloudflare R2
- ๐ง Email notifications via Resend
- ๐จ Modern, responsive interface
Before you begin, ensure you have:
- Node.js (v20.9.0 or higher)
- npm or yarn
- A PostgreSQL database
- Accounts for: Google Cloud Console, Cloudflare, and Resend
git clone <repository-url>
cd sticky-thoughts
npm installCreate a .env file in the project root:
# Application
NEXT_PUBLIC_BASE_URL=http://localhost:3000
# Database
DATABASE_URL=postgresql://USER:PASSWORD@HOST:PORT/DATABASE?schema=public
# Authentication
BETTER_AUTH_SECRET=your-secret-key-here
GOOGLE_CLIENT_ID=your-google-client-id
GOOGLE_CLIENT_SECRET=your-google-client-secret
# Cloudflare R2 Storage
CLOUDFLARE_R2_BUCKET_NAME=your-bucket-name
CLOUDFLARE_R2_BUCKET_REGION=auto
CLOUDFLARE_R2_ACCOUNT_ID=your-account-id
CLOUDFLARE_R2_ACCESS_ID=your-access-id
CLOUDFLARE_R2_ACCESS_KEY=your-access-key
CLOUDFLARE_R2_ENDPOINT_ACCESS=your-endpoint-url
# Email
RESEND_API_KEY=your-resend-api-keyDATABASE_URL - PostgreSQL Connection String
- Create a database using Prisma or any PostgreSQL compatible provider
- Copy your connection string in the format:
postgresql://postgres:password@localhost:5432/stickythoughts
- Paste it as the
DATABASE_URLvalue
BETTER_AUTH_SECRET - Authentication Secret
Generate a secure random string:
openssl rand -base64 32Or use an online generator like 1Password's generator
GOOGLE_CLIENT_ID & GOOGLE_CLIENT_SECRET - OAuth Credentials
- Go to Google Cloud Console
- Create a new project (or select existing)
- Enable Google+ API
- Create OAuth 2.0 Client ID credentials
- Add authorized redirect URI:
http://localhost:3000/api/auth/callback/google - Copy the Client ID and Client Secret
Cloudflare R2 Variables - Object Storage
- Sign up at Cloudflare
- Navigate to R2 Object Storage
- Create a new bucket and note the bucket name
- Go to Manage R2 API Tokens โ Create API token
- Copy the following values:
- Account ID
- Access Key ID
- Secret Access Key
- Bucket endpoint URL
- Region is typically
auto
RESEND_API_KEY - Email Service
- Sign up at Resend
- Navigate to API Keys
- Create a new API key
- Copy the key value
Run Prisma migrations to set up your database:
npx prisma generatenpm run devVisit http://localhost:3000 and start sharing thoughts! ๐
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the GNU Affero General Public License v3.0 (AGPL-3.0). See the LICENSE file for details.
If you encounter any issues or have questions, please open an issue on GitHub.