Merge pull request #10 from ravixalgorithm/main

added terms & documentation for all
This commit is contained in:
Mr. Algorithm 2025-10-04 21:07:20 +05:30 committed by GitHub
commit 61f99a64c1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 504 additions and 0 deletions

View File

@ -0,0 +1,76 @@
import { Metadata } from 'next';
export const metadata: Metadata = {
title: 'API Documentation - OpenStock',
description: 'Free and open API documentation for OpenStock platform - no paywalls, no barriers',
};
export default function ApiDocsPage() {
return (
<div className="container mx-auto px-4 py-12 max-w-4xl">
<div className="mb-8">
<h1 className="text-4xl font-bold text-gray-200 mb-4">Free & Open API Documentation</h1>
<p className="text-xl text-gray-200 mb-4">
Complete guide to integrating with the OpenStock API - completely free, forever
</p>
<div className="bg-blue-300 border border-blue-400 rounded-lg p-4">
<p className="text-black text-sm">
💡 <strong>Open Dev Society Promise:</strong> This API will always be free. No hidden costs, no usage limits for personal projects, no barriers to knowledge.
</p>
</div>
</div>
<div className="space-y-8">
{/* Philosophy */}
<section className="bg-gray-800 rounded-lg shadow-sm p-6 border">
<h2 className="text-2xl font-semibold text-gray-100 mb-4">🌍 Our API Philosophy</h2>
<p className="text-gray-200 mb-4">
We believe market data should be accessible to everyone - students building their first portfolio tracker,
developers creating tools for their community, and anyone who wants to learn about finance without barriers.
</p>
<ul className="text-gray-200 space-y-2">
<li> <strong>Always Free:</strong> Core features remain free forever</li>
<li> <strong>No Gatekeeping:</strong> Simple authentication, clear documentation</li>
<li> <strong>Community First:</strong> Built for learners, students, and builders</li>
<li> <strong>Open Source:</strong> API examples and SDKs are open source</li>
</ul>
</section>
{/* Community Support */}
<section className="bg-gray-800 rounded-lg shadow-sm p-6 border">
<h2 className="text-2xl font-semibold text-gray-100 mb-4">🤝 Community & Support</h2>
<div className="grid md:grid-cols-2 gap-4">
<div className="bg-green-200 p-4 rounded-lg">
<h3 className="font-semibold text-black mb-2">🎓 For Students</h3>
<p className="text-gray-800 text-sm">
Building a project for class? Email us at <strong>opendevsociety@cc.cc</strong> for unlimited access and mentorship.
</p>
</div>
<div className="bg-blue-300 p-4 rounded-lg">
<h3 className="font-semibold text-black mb-2">💻 For Developers</h3>
<p className="text-gray-800 text-sm">
Join our Discord community for code examples, troubleshooting, and collaboration opportunities.
</p>
</div>
</div>
</section>
{/* Open Source Commitment */}
<section className="bg-gray-800 rounded-lg p-6 border">
<h2 className="text-2xl font-semibold text-gray-200 mb-4">🔓 Open Source Promise</h2>
<p className="text-gray-200 mb-4">
This API, its documentation, and all example code are open source.
Found a bug? Want a feature? Submit a PR or issue on GitHub.
</p>
<div className="flex space-x-4">
<a target="_blank" rel="noopener noreferrer" href="https://github.com/Open-Dev-Society/"
className="bg-gray-200 text-gray-800 px-4 py-2 rounded hover:bg-gray-300 transition-colors">
Contact us
</a>
</div>
</section>
</div>
</div>
);
}

124
app/(root)/help/page.tsx Normal file
View File

@ -0,0 +1,124 @@
import { Metadata } from 'next';
// Removed unused lucide-react imports
export const metadata: Metadata = {
title: 'Help Center - OpenStock',
description: 'Free help and community support - no barriers, just guidance',
};
export default function HelpPage() {
const faqs = [
{
question: "Is OpenStock really free forever?",
answer: "Yes! We're part of the Open Dev Society, which means we'll never lock knowledge behind paywalls. Core features remain free always. We run on community donations and the belief that financial tools should be accessible to everyone."
},
{
question: "I'm a student - can I use this for my projects?",
answer: "Absolutely! That's exactly why we built this. Use it for school projects, learning, or building your portfolio. Need help? Our community loves mentoring students. Email student@opendevsociety.org for extra support."
},
{
question: "How do I add stocks to my favorites?",
answer: "Navigate to any stock page and click the star icon. You can also search using the search bar and add directly from results. Everything is designed to be intuitive - no complex tutorials needed."
},
{
question: "Can I contribute to OpenStock?",
answer: "We'd love that! OpenStock is open source and community-driven. Check our GitHub for issues marked 'good first issue' or 'help wanted'. Every contribution, no matter how small, makes a difference."
},
{
question: "What if I find a bug or have a feature request?",
answer: "Please tell us! Submit issues on GitHub, join our Discord, or email opendevsociety@gmail.com. We see every report as a chance to make the platform better for everyone."
}
];
return (
<div className="container mx-auto px-4 py-12 max-w-4xl">
<div className="text-center mb-12">
<h1 className="text-4xl font-bold text-gray-100 mb-4">Community Help Center</h1>
<p className="text-xl text-gray-200 mb-4">
Free help, guided by community, powered by the belief that everyone deserves support
</p>
<div className="bg-green-300 border border-green-200 rounded-lg p-4 max-w-2xl mx-auto">
<p className="text-black text-sm">
🤝 <strong>Our Promise:</strong> Every question matters. Every beginner is welcomed. No exclusion, ever.
</p>
</div>
</div>
{/* Help Philosophy */}
<div className="grid md:grid-cols-3 gap-6 mb-12">
<div className="bg-gray-800 rounded-lg shadow-sm p-6 border hover:shadow-md transition-shadow">
<h3 className="text-lg font-semibold text-blue-500 mb-2">Learn Together</h3>
<p className="text-gray-200 text-sm">
Every expert was once a beginner. Our guides are written by the community, for the community.
No jargon, no assumptions about prior knowledge.
</p>
</div>
<div className="bg-gray-800 rounded-lg shadow-sm p-6 border hover:shadow-md transition-shadow">
<h3 className="text-lg font-semibold text-green-500 mb-2">Community Support</h3>
<p className="text-gray-200 text-sm">
Real people helping real people. Our Discord community includes students, professionals,
and mentors who genuinely want to help you succeed.
</p>
</div>
<div className="bg-gray-800 rounded-lg shadow-sm p-6 border hover:shadow-md transition-shadow">
<h3 className="text-lg font-semibold text-purple-500 mb-2">Built with Care</h3>
<p className="text-gray-200 text-sm">
Every feature is designed with accessibility and ease-of-use in mind.
We believe powerful tools should be simple to use.
</p>
</div>
</div>
{/* Community FAQs */}
<section className="mb-12">
<h2 className="text-3xl font-bold text-gray-100 mb-8 text-center">Community Questions</h2>
<div className="space-y-4">
{faqs.map((faq, index) => (
<div key={index} className="bg-gray-800 rounded-lg shadow-sm p-6 border">
<h3 className="text-lg font-semibold text-gray-100 mb-2">{faq.question}</h3>
<p className="text-gray-200">{faq.answer}</p>
</div>
))}
</div>
</section>
{/* Community Connection */}
<section className="bg-gradient-to-r from-blue-200 to-purple-200 rounded-lg p-8 text-center">
<h2 className="text-2xl font-bold text-gray-900 mb-4">Join Our Community</h2>
<p className="text-gray-700 mb-6">
Don&apos;t struggle alone. Our community of builders, learners, and dreamers is here to help.
Because we believe the future belongs to those who build it openly.
</p>
<div className="flex flex-col sm:flex-row gap-4 justify-center">
<a
href="https://discord.gg/jdJuEMvk"
target="_blank"
rel="noopener noreferrer"
className="bg-blue-600 text-white px-6 py-3 rounded-lg hover:bg-blue-550 transition-colors text-center inline-block"
>
Join Discord Community
</a>
<a
<a
target="_blank"
rel="noopener noreferrer"
href="mailto:opendevsociety@gmail.com"
className="bg-gray-800 text-gray-200 px-6 py-3 rounded-lg hover:bg-gray-900 transition-colors text-center inline-block"
>
Email Help Team
</a>
</div>
<p className="text-xs text-gray-600 mt-4">
All support is free, always. We&apos;re here because we care, not for profit.
</p>
</section>
</div>
);
}

View File

@ -2,6 +2,7 @@ import Header from "@/components/Header";
import {auth} from "@/lib/better-auth/auth"; import {auth} from "@/lib/better-auth/auth";
import {headers} from "next/headers"; import {headers} from "next/headers";
import {redirect} from "next/navigation"; import {redirect} from "next/navigation";
import Footer from "@/components/Footer";
const Layout = async ({ children }: { children : React.ReactNode }) => { const Layout = async ({ children }: { children : React.ReactNode }) => {
const session = await auth.api.getSession({ headers: await headers() }); const session = await auth.api.getSession({ headers: await headers() });
@ -21,6 +22,8 @@ const Layout = async ({ children }: { children : React.ReactNode }) => {
<div className="container py-10"> <div className="container py-10">
{children} {children}
</div> </div>
<Footer />
</main> </main>
) )
} }

199
app/(root)/terms/page.tsx Normal file
View File

@ -0,0 +1,199 @@
import { Metadata } from 'next';
export const metadata: Metadata = {
title: 'Terms of Service - OpenStock',
description: 'Fair terms of service - built on trust, transparency, and community values',
};
export default function TermsPage() {
return (
<div className="container mx-auto px-4 py-12 max-w-4xl">
<div className="mb-8">
<h1 className="text-4xl font-bold text-gray-100 mb-4">Terms of Service</h1>
<p className="text-gray-300 mb-4">
<p className="text-gray-300 mb-4">
Last updated: October 4, 2025
</p>
</p>
<div className="bg-green-900 border border-green-700 rounded-lg p-4">
<p className="text-green-200 text-sm">
🤝 <strong>Written in Plain English:</strong> No legal jargon here. These terms are designed to be fair,
understandable, and aligned with our Open Dev Society values.
</p>
</div>
</div>
<div className="prose prose-lg max-w-none">
{/* Our Approach */}
<section className="mb-8 bg-gray-800 rounded-lg p-6 border border-gray-700">
<h2 className="text-2xl font-semibold text-gray-100 mb-4">🌟 Our Approach to Terms</h2>
<p className="text-gray-200 mb-4">
We believe terms of service should protect both users and creators without being exploitative.
These terms reflect the Open Dev Society manifesto: open, fair, community-first.
</p>
<ul className="text-gray-200 space-y-2">
<li> <strong>No Gotchas:</strong> What you see is what you get</li>
<li> <strong>Community Input:</strong> These terms were reviewed by our community</li>
<li> <strong>Fair Use:</strong> Reasonable limits that protect everyone</li>
<li> <strong>Always Free Core:</strong> We promise core features stay free forever</li>
</ul>
</section>
<section className="mb-8">
<h2 className="text-2xl font-semibold text-gray-100 mb-4">🎯 The Basics</h2>
<p className="text-gray-200 mb-4">
By using OpenStock, you're joining our community. Here's what that means:
</p>
<div className="bg-gray-800 border border-gray-700 rounded-lg p-6">
<ul className="text-gray-200 space-y-3">
<li>💙 <strong>Respectful Use:</strong> Use OpenStock to learn, build, and grow - not to harm others</li>
<li>🎓 <strong>Educational Focus:</strong> Perfect for students, personal projects, and learning</li>
<li>🤝 <strong>Community Spirit:</strong> Help others when you can, ask for help when you need it</li>
<li>🔓 <strong>Open Source Values:</strong> Contribute back when possible, share knowledge freely</li>
</ul>
</div>
</section>
<section className="mb-8">
<h2 className="text-2xl font-semibold text-gray-100 mb-4">💰 Our Free Forever Promise</h2>
<div className="bg-green-900 border border-green-700 rounded-lg p-6">
<p className="text-green-200 font-medium mb-3">Core features of OpenStock will always be free:</p>
<ul className="text-gray-200 space-y-2">
<li> Real-time stock data and charts</li>
<li> Personal watchlists and portfolio tracking</li>
<li> Basic market analysis tools</li>
<li> Community features and discussions</li>
<li> API access for personal projects</li>
</ul>
<p className="text-gray-300 text-sm mt-4 italic">
This isn't a "freemium trap" - it's our commitment to making financial tools accessible to everyone.
</p>
</div>
</section>
<section className="mb-8">
<h2 className="text-2xl font-semibold text-gray-100 mb-4">🛡 Investment Disclaimer (The Important Stuff)</h2>
<div className="bg-yellow-900 border border-yellow-700 rounded-lg p-6">
<p className="text-yellow-200 font-medium mb-2">Let's be crystal clear about this:</p>
<div className="text-gray-200 space-y-3">
<p>
<strong>OpenStock is an educational and analysis tool, not investment advice.</strong>
We provide data and tools to help you make informed decisions, but the decisions are yours.
</p>
<p>
<strong>We're not financial advisors.</strong> We're developers and community members who built
tools we wished existed when we were learning about investing.
</p>
<p>
<strong>Always do your own research.</strong> Use multiple sources, consult professionals,
and never invest more than you can afford to lose.
</p>
</div>
</div>
</section>
<section className="mb-8">
<h2 className="text-2xl font-semibold text-gray-100 mb-4">👥 Your Account & Responsibilities</h2>
<p className="text-gray-200 mb-4">
We trust you to be a good community member. Here's what we ask:
</p>
<div className="grid md:grid-cols-2 gap-4">
<div className="bg-blue-900 border border-blue-700 rounded-lg p-4">
<h3 className="font-semibold text-blue-200 mb-2"> What We'd Love</h3>
<ul className="text-blue-200 text-sm space-y-1">
<li> Share knowledge with other users</li>
<li> Report bugs and suggest improvements</li>
<li> Keep your account information current</li>
<li> Use the platform to learn and grow</li>
</ul>
</div>
<div className="bg-red-900 border border-red-700 rounded-lg p-4">
<h3 className="font-semibold text-red-200 mb-2"> What Hurts Everyone</h3>
<ul className="text-red-200 text-sm space-y-1">
<li> Sharing accounts or API keys</li>
<li> Trying to break or exploit the system</li>
<li> Harassing other community members</li>
<li> Using the platform for illegal activities</li>
</ul>
</div>
</div>
</section>
<section className="mb-8">
<h2 className="text-2xl font-semibold text-gray-100 mb-4">📊 Data & Content</h2>
<div className="bg-gray-800 border border-gray-700 rounded-lg p-6">
<p className="text-gray-200 mb-4">
<strong>Your data belongs to you.</strong> We provide tools to export everything anytime.
We'll never claim ownership of your watchlists, notes, or personal information.
</p>
<p className="text-gray-200 mb-4">
<strong>Market data comes from licensed sources.</strong> While we provide it for free,
please respect that it's meant for personal use and learning.
</p>
<p className="text-gray-200">
<strong>Community contributions are appreciated.</strong> If you share insights or contribute
to discussions, you're helping build a knowledge commons for everyone.
</p>
</div>
</section>
<section className="mb-8">
<h2 className="text-2xl font-semibold text-gray-100 mb-4">🔧 Service Availability</h2>
<p className="text-gray-200 mb-4">
We're committed to keeping OpenStock running, but we're also realistic:
</p>
<ul className="text-gray-200 space-y-2 ml-6">
<li> We aim for 99.9% uptime, but stuff happens (we're human!)</li>
<li> We'll give advance notice for planned maintenance</li>
<li> Major outages will be communicated on our status page and Discord</li>
<li> We're building sustainable infrastructure, not just cheap hosting</li>
</ul>
</section>
<section className="mb-8">
<h2 className="text-2xl font-semibold text-gray-100 mb-4">🔄 Changes to These Terms</h2>
<div className="bg-purple-900 border border-purple-700 rounded-lg p-6">
<p className="text-purple-200 mb-3">
<strong>We believe in transparency for terms changes too:</strong>
</p>
<ul className="text-gray-200 space-y-2">
<li> Community discussion on proposed changes</li>
<li> Clear explanation of what's changing and why</li>
<li> Version history available on GitHub</li>
</ul>
</div>
</section>
<section className="mb-8">
<h2 className="text-2xl font-semibold text-gray-100 mb-4">🤔 Questions or Concerns?</h2>
<p className="text-gray-200 mb-4">
Legal documents shouldn't be mysterious. If anything here confuses you or seems unfair,
let's talk about it.
</p>
<div className="bg-gray-800 border border-gray-700 rounded-lg p-4">
<p className="text-gray-200 mb-2">
<strong>Legal Questions:</strong>{' '}
<a href="mailto:legal@opendevsociety.org" className="text-blue-400 hover:text-blue-300">
opendevsociety@cc.cc
</a>
</p>
<p className="text-gray-200">
<strong>General Discussion:</strong> Join our Discord #community channel
</p>
</div>
</section>
<div className="bg-gray-800 border border-gray-700 rounded-lg p-6 text-center">
<h3 className="text-xl font-semibold text-gray-100 mb-3">The Open Dev Society Way</h3>
<p className="text-gray-200 mb-2">
"We build tools that empower people, create knowledge that's free for all,
and foster communities where everyone can grow."
</p>
<p className="text-gray-300 text-sm">
These terms reflect those values. Thanks for being part of our community. 🚀
</p>
</div>
</div>
</div>
);
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 178 KiB

101
components/Footer.tsx Normal file
View File

@ -0,0 +1,101 @@
import Link from "next/link";
import Image from "next/image";
import OpenDevSocietyBranding from "./OpenDevSocietyBranding";
const Footer = () => {
return (
<footer className="bg-gray-900 text-white border-t border-gray-800">
<div className="container mx-auto px-4 py-12">
<div className="grid grid-cols-1 md:grid-cols-3 gap-8">
{/* Brand Section */}
<div className="col-span-1 md:col-span-2">
<Link href="/" className="flex items-center gap-2 mb-4">
<Image
src="https://i.ibb.co/r28VWPjS/Screenshot-2025-10-04-123317-Picsart-Ai-Image-Enhancer-removebg-preview.png"
alt="OpenStock"
width={150}
height={38}
className="brightness-0 invert"
/>
</Link>
<p className="text-gray-400 mb-10 max-w-md">
OpenStock is an open-source alternative to expensive market platforms. Track real-time prices, set personalized alerts, and explore detailed company insights built openly, for everyone, forever free.
</p>
<div className="flex space-x-6">
<Link
href="https://github.com/Open-Dev-Society/OpenStock"
target="_blank"
rel="noopener noreferrer"
className="text-gray-400 hover:text-white transition-colors duration-200 relative group"
>
<span className="relative">
GitHub
<span className="absolute left-0 bottom-0 w-0 h-0.5 bg-white transition-all duration-300 group-hover:w-full"></span>
</span>
</Link>
<Link
href="https://www.linkedin.com/company/opendevsociety-in/"
target="_blank"
rel="noopener noreferrer"
className="text-gray-400 hover:text-blue-400 transition-colors duration-200 relative group"
>
<span className="relative">
LinkedIn
<span className="absolute left-0 bottom-0 w-0 h-0.5 bg-blue-400 transition-all duration-300 group-hover:w-full"></span>
</span>
</Link>
</div>
</div>
{/* Resources */}
<div>
<h3 className="text-lg font-semibold mb-4">Resources</h3>
<ul className="space-y-2">
<li>
<Link href="/api-docs" className="text-gray-400 hover:text-white transition-colors duration-200 relative group">
<span className="relative">
API Documentation
<span className="absolute left-0 bottom-0 w-0 h-0.5 bg-white transition-all duration-300 group-hover:w-full"></span>
</span>
</Link>
</li>
<li>
<Link href="/help" className="text-gray-400 hover:text-white transition-colors duration-200 relative group">
<span className="relative">
Help Center
<span className="absolute left-0 bottom-0 w-0 h-0.5 bg-white transition-all duration-300 group-hover:w-full"></span>
</span>
</Link>
</li>
<li>
<Link href="/terms" className="text-gray-400 hover:text-white transition-colors duration-200 relative group">
<span className="relative">
Terms of Service
<span className="absolute left-0 bottom-0 w-0 h-0.5 bg-white transition-all duration-300 group-hover:w-full"></span>
</span>
</Link>
</li>
</ul>
</div>
</div>
{/* Divider */}
<div className="border-t border-gray-800 mt-8 pt-8">
<div className="flex flex-col md:flex-row justify-between items-center">
{/* Copyright */}
<div className="text-gray-400 text-sm mb-4 md:mb-0">
© {new Date().getFullYear()} Open Dev Society. All rights reserved.
</div>
{/* Open Dev Society Branding */}
<div className="flex items-center space-x-2">
<OpenDevSocietyBranding />
</div>
</div>
</div>
</div>
</footer>
);
};
export default Footer;

View File

@ -1,6 +1,7 @@
import type { NextConfig } from "next"; import type { NextConfig } from "next";
const nextConfig: NextConfig = { const nextConfig: NextConfig = {
devIndicators: false,
/* config options here */ /* config options here */
images: { images: {
remotePatterns: [ remotePatterns: [