English | 简体中文
🧠 Professional Sexual Mental Health Assessment Tool Based on Scientific Research
The Sexual Repression Index Calculator is a professional assessment tool based on multiple validated psychological scales, helping users scientifically understand their sexual psychological characteristics and promote sexual health and intimate relationship development.
- 🔬 Scientific and Reliable: Based on internationally recognized scales including SIS/SES, Mosher Sexual Guilt, KISS-9, and SOS
- ⚡ Dual Version Support: Quick Assessment (39 questions, 8-15 minutes) + Full Assessment (117 questions, 25-40 minutes)
- 📊 Professional Analysis: Four-dimensional analysis + SRI Index (0-100) + Personalized recommendations
- 🔒 Privacy Protection: 100% local data processing, no server transmission
- 📱 Modern UI: Responsive design, supports all devices
- 💾 Data Management: History records, data export, auto-save
- 🔗 Social Sharing: Multi-platform sharing, smart copywriting, QR code generation
- Node.js >= 22.0.0
- Modern browser support
# Clone the project
git clone [project-url]
cd Sexual-Repression-Calculator
# Install dependencies
npm install
# Start development server
npm run dev
# Build for production
npm run build
# Start production server
npm start
docker run -p 8000:8000 appe233/sexual-repression-calculator
- Development environment: http://localhost:3000
- Production environment: Based on deployment configuration
This project is optimized for Cloudflare Pages deployment and can be easily deployed.
- Build command:
npm run cf:deploy - Output directory:
dist
- Push code to GitHub repository
- Create a Pages application in Cloudflare Dashboard
- Connect GitHub repository
- Configure build settings:
- Build command:
npm run cf:deploy - Output directory:
dist
- Build command:
- Click Deploy
To prevent the project from being maliciously resold, this project provides two anti-abuse mechanisms:
-
Redirect Page Mechanism (recommended for completely blocking access):
- Add environment variables in Cloudflare Pages project settings:
ABUSE_REDIRECT_ENABLED=true
- When this environment variable is set to
true, all access will be redirected to the anti-abuse explanation page - The page will automatically redirect to the GitHub original project address after a 5-second countdown
- Users can also manually click the button to jump immediately
- Add environment variables in Cloudflare Pages project settings:
-
Popup Reminder Mechanism (for reminding users):
- Add environment variables in Cloudflare Pages project settings:
SHOW_ABUSE_POPUP=true
- When this environment variable is set to
true, users will see an anti-abuse reminder popup when visiting the website - Users can close the popup and use the website normally
- Add environment variables in Cloudflare Pages project settings:
You can choose one or both mechanisms according to your needs.
When not in use, it is recommended to rename functions to disabled and comment out
{ from: "./functions/_middleware.js", to: "_middleware.js" }in rsbuild.config.cloudflare.ts to avoid excessive daily request consumption on Cloudflare
- This application is a pure static React application, all data processing is done on the client side
- No server-side API is required, all functions can be completed in the browser
- The application uses localStorage to store user data, data will not be uploaded to the server
- Use
--legacy-peer-depsparameter to resolve dependency conflicts
This project also supports deployment to the Vercel platform.
- Build command:
npm run build:vercel - Output directory:
dist
- Push code to GitHub repository
- Import project in Vercel Dashboard
- Configure build settings:
- Build command:
npm run build:vercel - Output directory:
dist
- Build command:
- Click Deploy
Vercel | do not provide demo
Vercel deployment does not require special environment variable configuration, but if you want to enable anti-abuse features, you can add the following environment variables:
1. Popup Reminder Mechanism:
- Add environment variable: SHOW_ABUSE_POPUP = true
Note: Due to Vercel's architectural limitations, the redirect page mechanism may not work properly, it is recommended to use the popup reminder mechanism.
This project also supports deployment to Hat Cloud platform.
- Build command:
npm run build - Output directory:
dist/web
- Push code to GitHub repository
- Create an application in Hat Cloud platform
- Connect GitHub repository
- Select
mainbranch - Configure build settings:
- Build command:
npm run build - Output directory:
dist/web
- Build command:
- Click Deploy
- When deploying on Hat Cloud platform, please note that the output directory should be set to
dist/webinstead of the defaultdist - If you encounter a 404 error, please check that the platform's output directory configuration is correctly set to
dist/web
- Duration: 8-15 minutes
- Questions: 39 questions
- Scales: SIS/SES-SF(14) + Mosher Sexual Guilt(10) + KISS-9(9) + SOS Screening(5)
- Applicable: First-time use, quick understanding
- Duration: 25-40 minutes
- Questions: 117 questions
- Scales: Full SIS/SES(45) + Full Mosher(28) + KISS-9(9) + Full SOS(21) + BSAS(23)
- Applicable: In-depth analysis, professional consultation
SRI = Σ(Standardized dimension scores) → 0-100 mapping
Four dimensions: SOS Reversed + Sexual Guilt + Sexual Shame + SIS Advantage
- Very Low (0-20): Less repression
- Low (20-40): Mild repression
- Moderate (40-60): Moderate repression
- High (60-80): High repression
- Very High (80-100): Severe repression
- Framework: React 19 + TypeScript
- Routing: React Router v7
- Styling: Tailwind CSS + shadcn/ui
- State Management: React Query + React Hooks
- Charts: Recharts
- Forms: React Hook Form + Zod
- Icons: Lucide React
- Runtime: Deno Edge Function
- Framework: Hono.js + zValidator
- Data Validation: Zod
- Build Tool: Rsbuild
User Data Flow:
Informed Consent → Demographics → Questionnaire Assessment → Result Calculation → Local Storage
↓
History Records ← Data Export
src/
├── components/ # React components
│ ├── assessment/ # Assessment related components
│ ├── common/ # Common components
│ └── ui/ # shadcn/ui components
├── pages/ # Page components
├── lib/ # Utility libraries
│ ├── scales/ # Scale definitions
│ ├── calculator/ # Calculation engine
│ └── storage/ # Storage management
├── types/ # TypeScript types
├── server/ # Server-side code
└── styles/ # Style files
- ✅ Local Processing: All data processed on client side, no server upload
- ✅ Anonymization: Exported data fully anonymized
- ✅ User Control: Users have complete data control
- ✅ Secure Cleanup: Provides secure data deletion function
- ✅ Transparency: Open source code, completely transparent
- Location: Browser localStorage
- Content: Assessment responses, result analysis, demographic information
- Encryption: Client-side storage, no encrypted transmission required
- Cleanup: Users can completely delete at any time
- SIS/SES: Dual control model scale by Janssen et al.
- Mosher Sexual Guilt: Classic sexual guilt measurement tool
- KISS-9: Sexual shame scale by Kyle et al.
- SOS: Sexual Opinion Survey by Fisher et al.
- BSAS: Sexual Attitudes Scale by Hendrick et al.
- All scales have undergone rigorous psychometric validation
- Good internal consistency and test-retest reliability
- Validated across multiple cultural contexts
- TypeScript strict mode
- ESLint + Prettier formatting
- Component-based design principles
- Functional programming preferred
- Fork the project
- Create feature branch
- Commit changes
- Submit Pull Request
# Type checking
npm run type-check
# Code linting
npm run lint
# Build testing
npm run build
- Visit homepage and select assessment version
- Carefully read the informed consent
- Fill in basic demographic information
- Complete questionnaire following the guidance
- View detailed result analysis
- SRI Index: Comprehensive sexual repression level (0-100)
- Four-dimensional Analysis: Specific problem area identification
- Personalized Recommendations: Improvement suggestions based on results
- Non-diagnostic: For self-understanding only, not a substitute for professional diagnosis
- This tool is for educational and self-understanding purposes only
- Cannot replace professional mental health services
- If you have serious mental health issues, please seek professional help
- Assessment results do not constitute medical diagnosis
This project is licensed under the MIT License - see the LICENSE file for details.
If you find this project helpful, please give us a ⭐️
Sexual Repression Index Calculator - Let scientific research serve personal growth and sexual health development