Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .env
Original file line number Diff line number Diff line change
@@ -1 +0,0 @@
VITE_API_BASE_URL=http://localhost:8080
2 changes: 1 addition & 1 deletion src/api/codingService.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Vite 프록시 설정을 통해 백엔드(Spring) API 서버와 통신합니다.
* vite.config.js에서 '/api' → http://localhost:8080 같은 식으로 프록시된다고 가정합니다.
*/
const BASE_URL = "/api";
const BASE_URL = "http://52.79.181.115:30000/api";

/**
* 난이도에 따라 랜덤 코딩 문제를 가져옵니다.
Expand Down
2 changes: 1 addition & 1 deletion src/api/interviewService.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// src/api/interviewService.js

const BASE_URL = "/api";
const BASE_URL = "http://52.79.181.115:30000/api";

/**
* 새 AI 면접 세션 시작 (레포 URL 기반 질문 생성)
Expand Down
2 changes: 1 addition & 1 deletion src/api/reviewService.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// src/api/reviewService.js
const BASE_URL = "http://localhost:8080/api";
const BASE_URL = "http://52.79.181.115:30000/api";

export const fetchCodeReview = async (code, comment, repoUrl) => {
const payload = {
Expand Down
18 changes: 14 additions & 4 deletions src/features/auth/GithubLoginButton.jsx
Original file line number Diff line number Diff line change
@@ -1,18 +1,28 @@
// src/features/auth/GithubLoginButton.jsx
const API_BASE_URL = import.meta.env.VITE_API_BASE_URL;
import { IconBrandGithub } from "@tabler/icons-react";

const API_BASE_URL = "http://52.79.181.115:30000/api";

export default function GithubLoginButton() {
const handleGithubLogin = () => {
// 백엔드 OAuth 진입점 (나중에 실제 엔드포인트로만 바꿔주면 됨)
// 백엔드 OAuth 진입점 (실제 GitHub 로그인 시작)
window.location.href = `${API_BASE_URL}/oauth2/authorization/github`;
};

return (
<button
onClick={handleGithubLogin}
className="btn-neon w-full py-2 mt-3 text-sm"
className="
w-full py-3 mt-4 flex items-center justify-center gap-2
rounded-xl font-semibold text-[15px]
bg-[#0d1117]/70 hover:bg-[#0d1117]/90
border border-white/10 backdrop-blur-lg
hover:shadow-[0_0_15px_rgba(255,255,255,0.25)]
transition-all duration-300
"
>
Login with GitHub
<IconBrandGithub size={20} className="text-white" />
<span className="text-white">Login with GitHub</span>
</button>
);
}
55 changes: 47 additions & 8 deletions src/features/auth/Login.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,55 @@ import GithubLoginButton from "./GithubLoginButton";

export default function Login() {
return (
<div className="bg-app min-h-screen flex items-center justify-center p-4">
<div className="gcard max-w-md w-full">
<div className="ginner glass-sheen p-6 space-y-4">
<div className="gheader text-base">Sign in</div>
<div className="min-h-screen flex flex-col items-center justify-center bg-[#0D1117] text-white p-4 relative overflow-hidden">
<div className="absolute top-0 left-1/2 -translate-x-1/2 w-full max-w-3xl h-80 bg-blue-500/10 blur-[100px] rounded-full pointer-events-none" />

{/* 나중에 이메일 로그인 넣고 싶으면 여기 */}

<GithubLoginButton />
<div className="w-full max-w-md z-10">
<div className="bg-[#161B22] border border-[#30363D] rounded-2xl shadow-2xl p-8 md:p-10">
<div className="flex flex-col items-center mb-8 text-center space-y-4">
<svg
height="48"
viewBox="0 0 16 16"
version="1.1"
width="48"
aria-hidden="true"
className="fill-white/90"
>
<path d="M8 0c4.42 0 8 3.58 8 8a8.013 8.013 0 0 1-5.45 7.59c-.4.08-.55-.17-.55-.38 0-.27.01-1.13.01-2.2 0-.75-.25-1.23-.54-1.48 1.78-.2 3.65-.88 3.65-3.95 0-.88-.31-1.59-.82-2.15.08-.2.36-1.02-.08-2.12 0 0-.67-.22-2.2.82-.64-.18-1.32-.27-2-.27-.68 0-1.36.09-2 .27-1.53-1.03-2.2-.82-2.2-.82-.44 1.1-.16 1.92-.08 2.12-.51.56-.82 1.28-.82 2.15 0 3.06 1.86 3.75 3.64 3.95-.23.2-.44.55-.51 1.07-.46.21-1.61.55-2.33-.66-.15-.24-.6-.83-1.23-.82-.67.01-.27.38.01.53.34.19.73.9.82 1.13.16.45.68 1.31 2.69.94 0 .67.01 1.3.01 1.49 0 .21-.15.45-.55.38A7.995 7.995 0 0 1 0 8c0-4.42 3.58-8 8-8Z"></path>
</svg>

<div>
<h1 className="text-2xl font-bold tracking-tight text-white">
Master Your Code
</h1>
<p className="mt-2 text-sm text-[#8B949E]">
AI-powered code reviews, mock interviews,<br />and technical testing.
</p>
</div>
</div>

<div className="w-full">
<GithubLoginButton />
</div>

<div className="relative mt-8">
<div className="absolute inset-0 flex items-center" aria-hidden="true">
<div className="w-full border-t border-[#30363D]"></div>
</div>
<div className="relative flex justify-center text-sm">
<span className="px-2 bg-[#161B22] text-[#8B949E] text-xs uppercase tracking-wide">
Developer Focused
</span>
</div>
</div>
</div>

{/* 링크 제거 및 단순 카피라이트 텍스트 */}
<p className="mt-8 text-center text-xs text-[#484F58]">
© 2025 SkillBoost. All rights reserved.
</p>

</div>
</div>
);
}
}
2 changes: 1 addition & 1 deletion src/features/codingTest/CodingTest.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import {
// [오류 수정] codingService.js 파일을 직접 통합하여 경로 오류 해결
// -----------------------------------------------------------

const BASE_URL = "/api";
const BASE_URL = "http://52.79.181.115:30000/api";

const fetchRandomProblem = async (difficulty) => {
const query = difficulty ? `?difficulty=${difficulty}` : "";
Expand Down
2 changes: 1 addition & 1 deletion src/features/home/Home.jsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// src/features/home/Home.jsx
import { Link } from "react-router-dom";
import { IconCode, IconChecklist, IconUserScan } from "@tabler/icons-react";
import Particles from "@tsparticles/react";
Expand All @@ -22,7 +23,6 @@ export default function Home() {

return (
<div className="min-h-screen flex flex-col relative overflow-hidden text-white">

{/* --- 상단 헤더 (로그인 / 사용자명 / 로그아웃) --- */}
<header className="w-full flex justify-end p-4 absolute z-20">
{hasToken ? (
Expand Down
4 changes: 2 additions & 2 deletions src/features/review/CodeReview.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const particlesOptions = {
},
};

const API_BASE_URL = import.meta.env.VITE_API_BASE_URL || "";
const API_BASE_URL = "http://52.79.181.115:30000/api";

function formatReviewText(review) {
if (!review) return "";
Expand Down Expand Up @@ -91,7 +91,7 @@ export default function Review() {
try {
const accessToken = localStorage.getItem("accessToken");

const response = await fetch(`${API_BASE_URL}/api/review`, {
const response = await fetch(`${API_BASE_URL}/review`, {
method: "POST",
headers: {
"Content-Type": "application/json",
Expand Down
13 changes: 7 additions & 6 deletions tailwind.config.cjs → tailwind.config.js
Original file line number Diff line number Diff line change
@@ -1,30 +1,31 @@
/** @type {import('tailwindcss').Config} */
module.exports = {

Check failure on line 2 in tailwind.config.js

View workflow job for this annotation

GitHub Actions / build

'module' is not defined
content: [
"./index.html",
"./src/**/*.{js,ts,jsx,tsx}",
"./src/**/*.{js,jsx,ts,tsx}",
],
theme: {
extend: {
keyframes: {
fadeIn: {
"0%": { opacity: 0, transform: "translateY(10px)" },
"100%": { opacity: 1, transform: "translateY(0)" }
"100%": { opacity: 1, transform: "translateY(0)" },
},
fadeInUp: {
"0%": { opacity: 0, transform: "translateY(20px)" },
"100%": { opacity: 1, transform: "translateY(0)" }
"100%": { opacity: 1, transform: "translateY(0)" },
},
fadeOut: {
"0%": { opacity: 1, transform: "translateY(0)" },
"100%": { opacity: 0, transform: "translateY(10px)" }
"100%": { opacity: 0, transform: "translateY(10px)" },
},
},
animation: {
fadeIn: "fadeIn 0.5s ease-out forwards",
fadeInUp: "fadeInUp 0.8s ease-out forwards",
fadeInOut: "fadeIn 0.3s ease-out, fadeOut 0.3s ease-in 2.7s forwards",
fadeInOut:
"fadeIn 0.3s ease-out, fadeOut 0.3s ease-in 2.7s forwards",
},
},
},
// plugins: [] // v4에서는 CSS에서 @plugin으로 불러옵니다
};
Loading