VerseFountain is a comprehensive digital library platform that empowers poets, readers, and literature enthusiasts to discover, share, and engage with creative content through advanced technological integrations and user-centric design.
- Digital Library: Extensive collection of books, poetry, and academic resources
- Poetry Community: Share, rate, and comment on poetry content
- Event Management: Create, browse, and register for literary events
- Real-time Chat: Join thematic chat rooms to discuss literary topics
- Ticketing System: Generate event tickets with QR codes
- Payment Processing: Handle paid event registrations
- User Management: Authentication and personalized profiles
A detailed explanation of the project's architecture, including frontend, backend, shared code, deployment, and an interaction diagram, can be found in the ARCHITECTURE.md file.
- Frontend: React, TypeScript, TailwindCSS, shadcn/ui
- Backend: Express.js, Node.js
- Database: PostgreSQL (Neon)
- State Management: TanStack Query
- Real-time Communication: WebSockets
- Authentication: Session-based auth with Passport.js
- Payment Processing: Paddle
- Deployment: Netlify
-
Clone the repository
-
Install dependencies:
npm install
-
Set up environment variables:
- Copy
.env.example
to.env
- Fill in the required values
- Copy
-
Start the development server:
npm run dev
When making schema changes, use the following steps:
- Update the schema in
shared/schema.ts
- Generate migration files:
npx drizzle-kit generate
- Apply migrations:
npx drizzle-kit push
Note: If you encounter issues with interactive prompts during drizzle-kit push
, you can manually apply the SQL from the generated migration files to your database.
- A Netlify account
- PostgreSQL database (e.g., Neon)
- Properly configured environment variables
-
Prepare for deployment:
npm run build
-
Deploy through Netlify CLI:
npm install -g netlify-cli netlify login netlify deploy
-
Or deploy through Netlify UI:
- Sign in to Netlify
- Go to "Sites" and click "Add new site" > "Import an existing project"
- Connect to your Git provider and select the repository
- Configure build settings:
- Build command:
npm run build
- Publish directory:
dist
- Build command:
- Click "Deploy site"
-
Set up environment variables in Netlify:
- In your site dashboard, go to "Site settings" > "Environment variables"
- Add all required environment variables from your
.env
file - Make sure to include
DATABASE_URL
and all other database credentials
-
Configure serverless functions:
- Netlify automatically detects functions in the
netlify/functions
directory - No additional configuration is required
- Netlify automatically detects functions in the
Netlify Functions don't natively support WebSockets, so we have two options:
-
Use the REST API fallback (implemented in the code)
- The application automatically detects when running on Netlify and uses AJAX polling instead
-
Use a third-party WebSocket service (for production):
- Consider services like Pusher, Firebase, or Ably
- Update the client code to use the chosen service
Sample users are created during the initial database seeding:
-
Regular User:
- Username:
user
- Password:
password
- Username:
-
Admin User:
- Username:
admin
- Password:
password
- Username: