We have constructed a series of new code families for the spectral-amplitude-coding optical code-division multiple-access (CDMA) system, and proposed new transmitter and receiver structures based on tunable chirped fiber Bragg gratings (FBGs). The proposed system has been analyzed by taking into account the effects of phase-induced intensity noise, shot noise, and thermal noise. We have also compared the performance of this system with that of a former system where a Hadamard code is used. It has been shown that the new code families can suppress the intensity noise effectively and improve the system performance significantly. When the effective power is large (i.e., >-10 dBm), the intensity noise is the main factor that limits the system performance. When the effective power is not sufficiently large, thermal and shot noise sources become the main limiting factors and the effect of thermal noise is much larger than that of shot noise.