Compare commits

..

11 Commits

Author SHA1 Message Date
56914ab8f7 docs: Add comprehensive README for SAPIENS Web3
- Latest iteration with cutting-edge features
- Public asset serving and PWA support
- Performance optimization strategies
- Extended API endpoints with advanced features
- Migration guide from Web2
- Comprehensive deployment guide

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-23 14:50:31 +09:00
41101d7798 Adjust spacing around the logo in the footer for better visual appeal
Update the className prop for the footer logo image in `Footer.tsx` to include `py-1`, adding vertical padding.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 8ed40069-729c-4a0d-a003-1834630466e9
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/3df548ff-50ae-432f-9be4-25d34eccc983/8ed40069-729c-4a0d-a003-1834630466e9/oZgexwr
2025-10-15 12:21:58 +00:00
60d6fb5db0 Reduce the size of the logo displayed in the website footer
Update the `h-8` class to `h-6` for the footer logo image in `client/src/components/Footer.tsx`.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 8ed40069-729c-4a0d-a003-1834630466e9
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/3df548ff-50ae-432f-9be4-25d34eccc983/8ed40069-729c-4a0d-a003-1834630466e9/oZgexwr
2025-10-15 12:21:28 +00:00
a47ced155d Update the header logo and remove the footer logo
Replace the footer logo with a white version and adjust header logo styling.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 8ed40069-729c-4a0d-a003-1834630466e9
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/3df548ff-50ae-432f-9be4-25d34eccc983/8ed40069-729c-4a0d-a003-1834630466e9/oZgexwr
2025-10-15 12:20:41 +00:00
42adf6bbe1 Update article page to show updated logo and smaller size
Update the SAPIENS logo source path in Article.tsx to include a version parameter and adjust its height.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 8ed40069-729c-4a0d-a003-1834630466e9
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/3df548ff-50ae-432f-9be4-25d34eccc983/8ed40069-729c-4a0d-a003-1834630466e9/oZgexwr
2025-10-15 12:14:51 +00:00
af65b5e830 Update search bar to use the home screen's search component
Replace search bars in media outlet and report pages with the home screen's search component.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 8ed40069-729c-4a0d-a003-1834630466e9
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/3df548ff-50ae-432f-9be4-25d34eccc983/8ed40069-729c-4a0d-a003-1834630466e9/oZgexwr
2025-10-15 12:13:14 +00:00
2629b1cde4 Reduce the size of the footer logo to two-thirds of its original dimensions
Resizes the footer logo image from h-16 to h-11 in client/src/components/Footer.tsx.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 8ed40069-729c-4a0d-a003-1834630466e9
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/3df548ff-50ae-432f-9be4-25d34eccc983/8ed40069-729c-4a0d-a003-1834630466e9/oZgexwr
2025-10-15 12:10:21 +00:00
6d27a263c2 Update footer logo source to ensure consistent styling
Update the footer logo image source in `client/src/components/Footer.tsx` by appending a cache-busting query parameter `?v=2` to the existing path `/attached_assets/sapiens_footer_logo.png`.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 8ed40069-729c-4a0d-a003-1834630466e9
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/3df548ff-50ae-432f-9be4-25d34eccc983/8ed40069-729c-4a0d-a003-1834630466e9/oZgexwr
2025-10-15 12:09:17 +00:00
9600c1e0ff Update the footer logo to match the selected image background
Replaced the footer logo image with 'sapiens_footer_logo.png' and removed the invert filter.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 8ed40069-729c-4a0d-a003-1834630466e9
Replit-Commit-Checkpoint-Type: full_checkpoint
2025-10-15 12:07:24 +00:00
1f1792811c Add SAPIENS logo to the footer in white text
Add a white SAPIENS logo to the left of the footer in Footer.tsx.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 8ed40069-729c-4a0d-a003-1834630466e9
Replit-Commit-Checkpoint-Type: full_checkpoint
2025-10-15 12:02:33 +00:00
abf65a5c67 Restored to '4481c4244afe6b42b771140c595876b23e2f44d9'
Replit-Restored-To: 4481c4244a
2025-10-15 11:57:31 +00:00
9 changed files with 192 additions and 8 deletions

184
README.md Normal file
View File

@ -0,0 +1,184 @@
# SAPIENS Web3
Latest iteration of SAPIENS Web platform with cutting-edge features and optimizations.
## Overview
SAPIENS Web3 represents the most advanced version of the SAPIENS platform, incorporating modern web technologies, enhanced user experience, and additional features including public asset serving and improved content delivery.
## Tech Stack
### Frontend
- **Framework**: React 18.3 with Vite 5.4
- **Language**: TypeScript 5.6
- **Styling**: Tailwind CSS 3.4 with shadcn/ui components
- **State Management**: TanStack React Query 5.60
- **Routing**: Wouter 3.3
- **UI Library**: Radix UI primitives
### Backend
- **Runtime**: Node.js with Express 4.21
- **Database**: PostgreSQL with Drizzle ORM 0.44
- **Authentication**: Passport.js with local and OpenID strategies
- **Session**: express-session with PostgreSQL store
## Project Structure
```
sapiens-web3/
├── client/ # React frontend
│ ├── src/
│ │ ├── components/ # UI components
│ │ ├── hooks/ # Custom React hooks
│ │ └── lib/ # Utilities
├── server/ # Express backend
│ ├── index.ts # Server entry point
│ ├── routes.ts # API routes
│ └── db/ # Database schemas
├── public/ # Static assets
├── scripts/ # Build and utility scripts
├── shared/ # Shared types and utilities
└── dist/ # Build output
```
## Key Features
### New in Web3
- Public asset serving with optimized delivery
- Enhanced media handling
- Improved caching strategies
- Advanced API endpoints
- Better SEO optimization
- Progressive Web App (PWA) support
### Improvements over Web2
- Enhanced performance with optimized bundling
- Improved database query optimization
- Better error handling and monitoring
- Advanced authentication features
- Enhanced security measures
## Getting Started
### Prerequisites
- Node.js 18+ and npm/yarn
- PostgreSQL 14+
### Installation
```bash
# Install dependencies
npm install
# Set up database
npm run db:push
```
### Environment Variables
Create a `.env` file:
```env
DATABASE_URL=postgresql://user:password@localhost:5432/sapiens_db3
SESSION_SECRET=your-session-secret
NODE_ENV=development
PORT=5000
PUBLIC_URL=http://localhost:5000
```
### Development
```bash
# Start development server
npm run dev
# Type checking
npm run check
# Run utility scripts
npm run scripts
```
### Production Build
```bash
# Build the application
npm run build
# Start production server
npm start
```
## Database Management
```bash
# Push schema changes to database
npm run db:push
# Generate migrations
drizzle-kit generate
# Run migrations
drizzle-kit migrate
```
## API Endpoints
Full REST API with extended features:
- `GET /api/outlets` - List news outlets with filtering
- `GET /api/outlets/:id/articles` - Get articles with pagination
- `GET /api/articles/:id` - Get article details with related content
- `GET /api/categories` - List all categories
- `GET /api/trending` - Get trending articles
- `POST /api/auth/login` - User login
- `POST /api/auth/register` - User registration
- `POST /api/bookmarks` - Manage user bookmarks
## Public Assets
Static files are served from the `/public` directory and accessible at `/public/*`. This includes:
- Images
- Icons
- Fonts
- Other static resources
## Performance Optimization
- Code splitting with dynamic imports
- Image optimization
- CSS purging in production
- Gzip compression
- Browser caching strategies
## Contributing
1. Create a feature branch from `main`
2. Make your changes following the code style
3. Run type checking: `npm run check`
4. Test all features thoroughly
5. Update documentation if needed
6. Submit a pull request with clear description
## Migration Guide
### From Web2 to Web3
1. Update database connection to use new database
2. Run migrations: `npm run db:push`
3. Update environment variables
4. Move static assets to `/public` directory
5. Test all endpoints and features
## Deployment
For production deployment:
1. Set `NODE_ENV=production`
2. Build the application: `npm run build`
3. Configure reverse proxy (Nginx recommended)
4. Set up SSL certificates
5. Configure database connection pooling
6. Enable monitoring and logging
## License
Proprietary - All rights reserved

Binary file not shown.

After

Width:  |  Height:  |  Size: 448 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

View File

@ -10,9 +10,9 @@ export default function Footer() {
<div className="flex items-center justify-between py-2">
<div className="flex items-center">
<img
src="/attached_assets/footer logo_1760529287220.png"
src="/attached_assets/sapiens_white_footer_logo.png"
alt="SAPIENS"
className="h-16 cursor-pointer hover:opacity-80 transition-opacity"
className="h-6 py-1 cursor-pointer hover:opacity-80 transition-opacity"
data-testid="footer-logo"
onClick={() => setLocation("/")}
/>

View File

@ -241,9 +241,9 @@ export default function Article() {
<div className="pl-10 pr-16 py-1.5 bg-gray-50 border border-gray-200 rounded-md flex items-center space-x-2 hover:bg-gray-100 transition-colors">
<span className="text-sm text-gray-500">search in</span>
<img
src="/attached_assets/sapiens_black_logo.png"
src="/attached_assets/sapiens_black_logo.png?v=3"
alt="SAPIENS"
className="h-4 w-auto"
className="h-2 w-auto"
/>
</div>
</div>

View File

@ -238,9 +238,9 @@ export default function MediaOutlet() {
<div className="pl-10 pr-16 py-1.5 bg-gray-50 border border-gray-200 rounded-md flex items-center space-x-2 hover:bg-gray-100 transition-colors">
<span className="text-sm text-gray-500">search in</span>
<img
src="/attached_assets/sapiens_black_logo.png"
src="/attached_assets/sapiens_black_logo.png?v=3"
alt="SAPIENS"
className="h-4 w-auto"
className="h-2 w-auto"
/>
</div>
</div>

View File

@ -507,9 +507,9 @@ export default function Report() {
<div className="pl-10 pr-16 py-1.5 bg-gray-50 border border-gray-200 rounded-md flex items-center space-x-2 hover:bg-gray-100 transition-colors">
<span className="text-sm text-gray-500">search in</span>
<img
src="/attached_assets/sapiens_black_logo.png"
src="/attached_assets/sapiens_black_logo.png?v=3"
alt="SAPIENS"
className="h-4 w-auto"
className="h-2 w-auto"
/>
</div>
</div>