This is a modern newsletter platform with custom CMS to create and manage blogs, newsletters and members with Notion style text editor built with Turborepo, Next.js, and various other cutting-edge technologies. The project uses a monorepo structure to manage multiple applications and shared packages.
- Turborepo - High-performance build system
- Next.js - React framework
- Tailwind CSS - Utility-first CSS framework
- Prisma - Next-generation ORM
- Shadcn/ui - Re-usable components
- AceternityUI - Modern animated components
- Recoil - State management
- Clerk - Authentication
- Resend - Modern way of sending email
- Digital Ocean - New age managed services. Using for redis, mongodb etc.
- PostHog - Best tool for analytics and best free tier.
- AWS - Suing S3 bucket here to store all the media
web/- Blog site with personal website. Newsletter page with option to subscribe Live hereadmin/- Admin site with create blogs, newsletter and user management. Enhancements are still in progress. Link to demo
actions/- Shared business logic and API actionsdb/- Database client and schema definitionsui/- Shared UI component librarystore/- State management and data storesschema/- Shared type definitions and schemasconfig-tailwind/- Shared Tailwind configurationconfig-typescript/- Shared TypeScript configurationsconfig-eslint/- Shared ESLint configurations
- Node.js >= 16
- Yarn
- MongoDB (for Prisma)
- Clone the repository:
git clone https://github.com/deepshaswat/deepshaswat.com.git- Install dependencies:
yarn install- Set up environment variables:
cp .env.example .env- Start the development server:
yarn devyarn buildyarn testThe following environment variables need to be configured for full functionality:
| Variable | Description | How to Get |
|---|---|---|
DATABASE_URL |
MongoDB connection string | MongoDB Atlas or DigitalOcean |
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY |
Clerk public key | Clerk Dashboard |
CLERK_SECRET_KEY |
Clerk secret key | Clerk Dashboard |
RESEND_API_KEY |
Resend API key for emails | Resend Dashboard |
RESEND_AUDIENCE_ID |
Resend audience ID | Resend Audiences |
| Variable | Description | How to Get |
|---|---|---|
AWS_ACCESS_KEY_ID |
AWS access key | AWS IAM Console |
AWS_SECRET_ACCESS_KEY |
AWS secret key | AWS IAM Console |
AWS_S3_BUCKET_NAME |
S3 bucket name | Create in S3 Console |
AWS_REGION |
AWS region (e.g., us-east-1) | Your S3 bucket region |
| Variable | Description | How to Get |
|---|---|---|
REDIS_URL |
Redis connection string | DigitalOcean Managed Redis |
| Variable | Description | How to Get |
|---|---|---|
NEXT_PUBLIC_POSTHOG_KEY |
PostHog project API key | PostHog Dashboard |
NEXT_PUBLIC_POSTHOG_HOST |
PostHog host URL | Usually https://app.posthog.com |
| Variable | Description | How to Get |
|---|---|---|
GCP_PROJECT_ID |
Google Cloud project ID | GCP Console |
GCP_LOCATION |
GCP region (default: us-central1) | Vertex AI Regions |
GOOGLE_APPLICATION_CREDENTIALS |
Path to service account JSON | See setup below |
To enable AI-powered features (topic suggestions, trending analysis, script generation, image generation):
-
Create a GCP Project
# Install gcloud CLI if not installed # https://cloud.google.com/sdk/docs/install gcloud projects create your-project-id gcloud config set project your-project-id
-
Enable Vertex AI API
gcloud services enable aiplatform.googleapis.com -
Create Service Account
gcloud iam service-accounts create vertex-ai-sa \ --display-name="Vertex AI Service Account" gcloud projects add-iam-policy-binding your-project-id \ --member="serviceAccount:vertex-ai-sa@your-project-id.iam.gserviceaccount.com" \ --role="roles/aiplatform.user" gcloud iam service-accounts keys create ./vertex-ai-key.json \ --iam-account=vertex-ai-sa@your-project-id.iam.gserviceaccount.com
-
Set Environment Variables
GCP_PROJECT_ID=your-project-id GCP_LOCATION=us-central1 GOOGLE_APPLICATION_CREDENTIALS=/path/to/vertex-ai-key.json
-
Enable Imagen API (for image generation)
- Go to Vertex AI Console
- Navigate to "Model Garden"
- Find and enable "Imagen" model
Set up a cron job to publish scheduled posts:
# Call this endpoint every minute
curl -X POST https://your-admin-domain.com/api/cron/publish-scheduled \
-H "Authorization: Bearer YOUR_CRON_SECRET"Add to your environment:
CRON_SECRET=your-secure-cron-secret
- Configure all required environment variables
- Set up MongoDB database
- Set up Redis cache
- Create S3 bucket with CORS configuration
- Set up Clerk authentication
- Configure Resend for emails
- (Optional) Set up PostHog analytics
- (Optional) Set up Vertex AI for AI features
- Set up cron job for scheduled posts
- Configure domain and DNS
- Set up SSL certificates
| Feature | Status | Config Required |
|---|---|---|
| Blog Editor | ✅ Ready | Core services |
| Newsletter Sending | ✅ Ready | Resend |
| Image Upload | ✅ Ready | AWS S3 |
| Member Management | ✅ Ready | Core services |
| Scheduled Posts | ✅ Ready | Cron job |
| Analytics | ✅ Ready | PostHog (optional) |
| AI Topic Discovery | ✅ Ready | Vertex AI (optional) |
| AI Outline Generator | ✅ Ready | Vertex AI (optional) |
| AI Script Generator | ✅ Ready | Vertex AI (optional) |
| AI Image Generator | ✅ Ready | Vertex AI Imagen (optional) |
MIT