TicPost

A full-stack social network built with React, Node.js, Express, Prisma, and MongoDB.

Live Demo · Source Code

TicPost is a social network project focused on building a complete web application, from the user interface to the backend and database. It provides a space for users to create posts, manage their profiles, and share content through a responsive interface.

Features

Tech Stack

Frontend

Backend

External Services

Project Structure

TicPost/
├── backend/
│   ├── prisma/
│   ├── src/
│   │   ├── config/
│   │   ├── controllers/
│   │   ├── lib/
│   │   ├── middlewares/
│   │   ├── services/
│   │   └── server.js
│   └── package.json
│
├── frontend/
│   ├── src/
│   │   ├── assets/
│   │   ├── components/
│   │   ├── context/
│   │   ├── hooks/
│   │   ├── pages/
│   │   ├── routes/
│   │   └── services/
│   └── package.json
│
├── .github/
│   └── workflows/
├── .gitignore
└── README.md

The frontend and backend share one repository but are deployed independently.

Authentication and Security

TicPost uses JWTs stored in HttpOnly cookies, preventing client-side JavaScript from directly reading the authentication token. Passwords are hashed with bcryptjs before being stored.

Registration requires email verification before a user account is created. Verification codes are stored as hashes and have an expiration time.

Protected operations use authentication middleware, while ownership checks are performed on the server rather than relying on information supplied by the frontend.

Running Locally

Prerequisites

1. Clone the repository

git clone https://github.com/devMathV/TicPost.git
cd TicPost

2. Install backend dependencies

cd backend
npm install

3. Configure backend environment variables

Create a .env file inside backend/:

DATABASE_URL=
JWT_SECRET=
JWT_EXPIRES_IN=
FRONTEND_URL=

RESEND_API_KEY=
RESEND_FROM_EMAIL=

CLOUDINARY_CLOUD_NAME=
CLOUDINARY_API_KEY=
CLOUDINARY_API_SECRET=

Fill in the values required by your environment. Never commit this file or expose API keys, database credentials, or JWT secrets.

4. Generate Prisma Client

From the backend/ directory, run:

npx prisma generate

If you are setting up a new database, synchronize its schema according to the project’s Prisma configuration before starting the application.

5. Start the backend

npm run server

6. Configure and start the frontend

Open another terminal:

cd frontend
npm install

Create a .env file inside frontend/:

VITE_API_URL=http://localhost:3000

Start Vite:

npm run dev

Open the local URL displayed by Vite in your terminal.

Deployment

The application uses separate hosting services for the frontend and backend.

Production environment variables must be configured in the relevant hosting dashboards. The frontend build uses VITE_API_URL to identify the deployed backend API.

Project Goals

TicPost is a practical full-stack development project built to strengthen my understanding of:

Status

TicPost is an ongoing personal project. Its implementation and deployment are being refined as new features and improvements are introduced.