This is a code bundle for Facebook-like landing page. The original project is available at https://www.figma.com/design/hETqHM5KYbFmSOVduMk1JU/Facebook-like-landing-page.
Run npm i to install the dependencies.
Run npm run dev to start the frontend locally.
Run npm run dev-backend to start the frontend and backend for local development.
To access the app from another device on the same network, open the Vite URL shown in the terminal, for example http://192.168.x.x:5173.
The backend reads DATABASE_URL from backend/.env.
Example:
DATABASE_URL=postgresql://USER:PASSWORD@HOST/DATABASE_NAME
PORT=5000
FRONTEND_URL=http://localhost:5173,https://facebooklike.onrender.comImportant notes:
- Keep the exact
External Database URLfrom Render. Do not invent the host, user, or database name. - The backend already tries to reuse existing tables and data in the
publicschema. - On startup, the server runs compatibility checks for
usersandmessagesand only creates missing columns/tables when needed. - Existing rows are preserved. The code does not drop tables or truncate data.
Recommended workflow:
- In Render, open your PostgreSQL service and copy the
External Database URL. - Paste that value into
backend/.envasDATABASE_URL=.... - Start the backend from the
backendfolder withnpm start, or from the repo root withnpm run dev-backend. - If your existing database already has
usersandmessagesin thepublicschema, the app will use them. - If your old tables use legacy column names, the backend will try to rename them automatically to the names expected by the app.
If your existing data is in a different schema than public, you must either move it into public or update the SQL queries in the backend to target that schema.